Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method _parse_line improperly parses TR_J1 data #103

Open
yannsta opened this issue Aug 24, 2020 · 0 comments
Open

Method _parse_line improperly parses TR_J1 data #103

yannsta opened this issue Aug 24, 2020 · 0 comments

Comments

@yannsta
Copy link

yannsta commented Aug 24, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant