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

2021.12.12 error #5

Open
leranp opened this issue Dec 13, 2021 · 2 comments
Open

2021.12.12 error #5

leranp opened this issue Dec 13, 2021 · 2 comments

Comments

@leranp
Copy link

leranp commented Dec 13, 2021

Started after the update of onvif component, my Ha is 2021.12.1 via docker

Traceback (most recent call last):
File "/config/custom_components/onvif/zeeep/xsd/types/builtins.py", line 181, in pythonvalue
return isodate.parse_datetime(value)
File "/usr/local/lib/python3.9/site-packages/isodate/isodatetime.py", line 55, in parse_datetime
tmpdate = parse_date(datestring)
File "/usr/local/lib/python3.9/site-packages/isodate/isodates.py", line 201, in parse_date
return date(sign * int(groups['year']),
ValueError: month must be in 1..12

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/onvif/zeeep/xsd/types/simple.py", line 79, in parse_xmlelement
return self.pythonvalue(xmlelement.text)
File "/config/custom_components/onvif/zeeep/xsd/types/builtins.py", line 44, in _wrapper
return func(self, re.sub(r"[\n\r\t ]", " ", value).strip())
File "/config/custom_components/onvif/zeeep/xsd/types/builtins.py", line 183, in pythonvalue
raise ValueError("Invalid datetime '{}'".format(value))
ValueError: Invalid datetime '2485-13-13T18:14:13Z'
@slydiman
Copy link
Owner

slydiman commented Dec 13, 2021

Right, it is a known issue.

The first exception is generated by the updated library zeep. But the error message month must be in 1..12 is not useful.
I have added more useful logging to see the original wrong datetime. 2485-13-13T18:14:13Z is really an incorrect datetime. 2485 is incorrect year and 13 is incorrect month. It seems this wrong datetime is reported by the camera. I have no idea what to do in this case. It seems the camera and the integration still work with these errors. Hope we can just ignore them. But now you know that your camera can response such datetime. Probably it is already fixed, so check for the camera firmware update.

@leranp
Copy link
Author

leranp commented Dec 14, 2021

Right, it is a known issue.

The first exception is generated by the updated library zeep. But the error message month must be in 1..12 is not useful.
I have added more useful logging to see the original wrong datetime. 2485-13-13T18:14:13Z is really an incorrect datetime. 2485 is incorrect year and 13 is incorrect month. It seems this wrong datetime is reported by the camera. I have no idea what to do in this case. It seems the camera and the integration still work with these errors. Hope we can just ignore them. But now you know that your camera can response such datetime. Probably it is already fixed, so check for the camera firmware update.

Thank you for the reply,
My camera doesn't have an firmware update , the date was fine before the 2021.12.12 update.
But in the end everything is working fine.

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

2 participants