-
Notifications
You must be signed in to change notification settings - Fork 82
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
Python bug with strptime #692
Comments
I thought this error was only applicable to embedded Pythons <= 3.7 (which we don't support anymore)? What version are you running? |
Nevermind, it seems to have continued - see the discussion moved to Github python/cpython#71587. It is fixed for Python 3.12 and 3.13 since June, again the question of what Domoticz uses as Python version. As you have a workaround, I would first like to understand a little when/if this upstream bugfix could be in your system. |
Bullseye... So python 3.9... Far from the 3.12 :-(. |
Hey! Thanks a lot! |
Describe the issue
As described in https://bugs.python.org/issue27400, there is a bug in python when using it in embedded python. Calling
datetime.datetime.strptime
, could result inTypeError: 'NoneType' object is not callable
.Currently I am running into that case with my integration in Domoticz on https://github.com/bimmerconnected/bimmer_connected/blob/master/bimmer_connected/utils.py#L32, because of trying to get the timestamp of the data through https://github.com/bimmerconnected/bimmer_connected/blob/master/bimmer_connected/vehicle/vehicle.py#L224.
A workaround is described in the bug report and sample code can be found below.
Currently I implemented the workaround by not using the vehicle
timestamp
property, but rather getting the timestamp by parsing the vehicle data myself from the https://github.com/bimmerconnected/bimmer_connected/blob/master/bimmer_connected/vehicle/vehicle.py#L86.Expected behavior
Would it be possible to implement this workaround in the https://github.com/bimmerconnected/bimmer_connected/blob/master/bimmer_connected/utils.py#L32?
Which Home Assistant version are you using?
(using Domoticz)
What was the last working version of Home Assistant Core?
No response
What is your region?
Rest of world
MyBMW website
Number of cars
Output of bimmer_connected fingerprint
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: