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

fixed datetime obj parsing from str for tz handling #30

Merged
merged 1 commit into from
Aug 28, 2021

Conversation

pes100a500or
Copy link
Contributor

@pes100a500or pes100a500or commented Aug 27, 2021

Running the example.py throws errors:
vehicle.py:
TypeError: replace() takes no keyword arguments
dashboard.py:
AttributeError: 'str' object has no attribute 'astimezone'

Both were related to handling date values in string format as datetime object (e.g. the replace function matches the build-in for str).
I fixed it by parsing the str format with datetime.strptime().

@Farfar Farfar merged commit 3f6397a into skodaconnect:main Aug 28, 2021
@Farfar
Copy link
Collaborator

Farfar commented Aug 28, 2021

Looks good. I don't have time to test right now so I trust you have tested and it's working good.

@pes100a500or pes100a500or deleted the bug-datetimeobjfromstr branch August 28, 2021 19:33
@pes100a500or
Copy link
Contributor Author

Yes, I tested it with the example.py but without the parkingTimeUTC parameter as this was not included in my car parameters. In addition - please check the pypi package - the patch is currently not included in the corresponding wheel?

@Farfar
Copy link
Collaborator

Farfar commented Aug 28, 2021

Yes, I tested it with the example.py but without the parkingTimeUTC parameter as this was not included in my car parameters. In addition - please check the pypi package - the patch is currently not included in the corresponding wheel?

Good!
And this Will be included in next release, 1.0.52 was released before pull.

@Farfar Farfar mentioned this pull request Aug 31, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants