pvoutput
pvoutput copied to clipboard
TypeError: Cannot localize tz-aware Timestamp, use tz_convert for conversions in quick_start.ipynb
Dear all,
I tried the quick_start.ipynb example and get the following error:
_TypeError: Cannot localize tz-aware Timestamp, use tz_convert for conversions
File ~\anaconda3\envs\pvoutput\lib\site-packages\pvoutput\pvoutput.py:1052 in _set_rate_limit_params self.rate_limit_reset_time = self.rate_limit_reset_time.tz_localize("utc")
File pandas_libs\tslibs\timestamps.pyx:2098 in pandas.libs.tslibs.timestamps.Timestamp.tz_localize
To Reproduce: pip install pvoutput-ocf I use python 3.8
Thanks in advance for the support. Fabi
change from:
self.rate_limit_reset_time = self.rate_limit_reset_time.tz_localize("utc")
to:
self.rate_limit_reset_time = self.rate_limit_reset_time.tz_convert("utc")
fixes this issue on Python 3.11.4
Thanks @GabesSmith for this. would you be interested in doing a PR for this?