-
Notifications
You must be signed in to change notification settings - Fork 44
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
Error with the isoformat string #123
Comments
See #109. This happens on Python 3.9 or below. |
Align with requirements.txt. Required for skodaconnect#109. Note that HA-core already depends on 3.12. Fixes skodaconnect#123
Hello, just now, I installed the new 1.3.11 version, but I got the same error as before. Sorry, but 1.3.11 has still the isostring problem. Thanks Stefan |
There is no fix, you just need to update your Python version. #125 just bumps the minimum Python version required for this package to 3.11. |
Sorry for my misunderstanding... Thanks Stefan |
+ @badrpc FYI if you have any ideas or suggestions The primary use-case for this project is to be used in Homeassistant, through https://github.com/skodaconnect/homeassistant-skodaconnect so it's going to track the Python versions/requirements from HA, which is currently 3.11 (or even 3.12) I think. @SW-OS if you can propose a fix which still resolved skodaconnect/homeassistant-skodaconnect#225 / #99 but also works on Python 3.9 that would be ok for me. |
As I mentioned in #99 (comment) |
@SW-OS are you able to validate if this works for you? |
I was following the solution of https://pypi.org/project/backports-datetime-fromisoformat/ This worked perfect without changing your scripts (i.e. vehicle.py) within the module..... I had only to install the package and to add two lines for importing in the head of the main script.... In my mind the best solution...... Regards |
Hello,
I'm using your script successfully.. thanks for your work.
But since version 1.3.10 I got an error concerning the iosformat string.
Reinstallung version 1.3.9 the error was not seen anymore.
I renamed the example.py to connection_org.py and entered the password and account. Subsequently I started the script from the command shell on a raspberry like: python3 connection_org.py and got the following output:
File "connect_org.py", line 358, in
loop.run_until_complete(main())
File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "connect_org.py", line 247, in main
print(f'\tstr_state: {instrument.str_state} - state: {instrument.state}')
File "/usr/local/lib/python3.7/dist-packages/skodaconnect/dashboard.py", line 123, in str_state
return f'{self.state}'
File "/usr/local/lib/python3.7/dist-packages/skodaconnect/dashboard.py", line 127, in state
val = super().state
File "/usr/local/lib/python3.7/dist-packages/skodaconnect/dashboard.py", line 58, in state
if hasattr(self.vehicle, self.attr):
File "/usr/local/lib/python3.7/dist-packages/skodaconnect/vehicle.py", line 1542, in last_connected
last_connected = datetime.fromisoformat(last_connected_utc)
ValueError: Invalid isoformat string: '2024-04-09T05:10:13.029Z'
Thanks for any tipps
Stefan
The text was updated successfully, but these errors were encountered: