You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.
Describe the bug
If you query HQ close to midnight, data is still being rolled out.
One corner case is already taken care of (yesterday - 1).
But, HQ will release the consumption without average_temperature.
If you query during this interval, you get None and code can crash.
Traceback (most recent call last):
File "/usr/local/bin/pyhydroquebec", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/pyhydroquebec/__main__.py", line 168, in main
output_text(results[0], args.hourly)
File "/usr/local/lib/python3.7/site-packages/pyhydroquebec/outputter.py", line 24, in output_text
print(YESTERDAY_TPL.format(d=data))
TypeError: unsupported format string passed to NoneType.__format__
To Reproduce
Run the std use case
pyhydroquebec -u XXX -p XXX
Expected behavior
No errors. :)
PyHydroQuebec and Python version
Python 3.7.5
PyHydroQuebec 3.0.0 (master as of today)
Corner Cases
Are you in one of this situations:
Change of address
Change of rate
Add a new contract
Remove an old contract
No
Other: query close to midnight (2AM in my test)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
If you query HQ close to midnight, data is still being rolled out.
One corner case is already taken care of (yesterday - 1).
But, HQ will release the consumption without average_temperature.
If you query during this interval, you get None and code can crash.
To Reproduce
Run the std use case
Expected behavior
No errors. :)
PyHydroQuebec and Python version
Python 3.7.5
PyHydroQuebec 3.0.0 (master as of today)
Corner Cases
Are you in one of this situations:
The text was updated successfully, but these errors were encountered: