Skip to content

Method _parse_line improperly parses TR_J1 data  #103

@yannsta

Description

@yannsta

Hi there. I'm new to GitHub so the issue I cover below may not be as detailed as you may be used to.

Currently, "report.py" handles COUNT 5 'TR_J1' data in similar ways as a COUNTER 4 'JR1' data. However, because the columns are different in a TR_J1 report, the data I extract is offset. Please find a reproducible example below.

I am running Python 3.7, pycounter Release v2.1.4, on an Apple Macbook Pro (10.15.6)

Source
please see attached file
TestFile_COP5-TR_J1-report.txt

Commands

  1. import pycounter
  2. report = pycounter.report.parse('TestFile_COP5-TR_J1-report.txt')
  3. for journal in report:
  4. for item in journal:
  5. print(item)

Output
MonthsUsage(month=datetime.date(2017, 10, 1), metric='Total_Item_Requests', usage=25)

Expected output
MonthsUsage(month=datetime.date(2017, 10, 1), metric='Total_Item_Requests', usage=0)

Thank you so much for your contributions to pycounter. They have been very useful to me. Best - Ian

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions