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

Error when running the example #348

Open
pr0te opened this issue May 1, 2024 · 0 comments
Open

Error when running the example #348

pr0te opened this issue May 1, 2024 · 0 comments

Comments

@pr0te
Copy link

pr0te commented May 1, 2024

Describe the bug
It appears that something goes wrong when running simple_client_example.py. If it's relevant, I have a Yaris Cross. Here's the output:
Logging in...
Retrieving cars...
Traceback (most recent call last):
File "C:\Users\tnl\OneDrive\Code\Toyota.venv\simple_client_example.py", line 74, in
loop.run_until_complete(get_information())
File "C:\Users\tnl\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 650, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\tnl\OneDrive\Code\Toyota.venv\simple_client_example.py", line 46, in get_information
cars = await client.get_vehicles(metric=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tnl\AppData\Local\Programs\Python\Python311\Lib\site-packages\mytoyota\client.py", line 63, in get_vehicles
vehicles = await self._api.get_vehicles_endpoint()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tnl\AppData\Local\Programs\Python\Python311\Lib\site-packages\mytoyota\api.py", line 81, in get_vehicles_endpoint
parsed_response = await self._request_and_parse(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tnl\AppData\Local\Programs\Python\Python311\Lib\site-packages\mytoyota\api.py", line 55, in _request_and_parse
return model(**response)
^^^^^^^^^^^^^^^^^
File "pydantic\main.py", line 341, in pydantic.main.BaseModel.init
pydantic.error_wrappers.ValidationError: 4 validation errors for VehiclesResponseModel
payload -> 0 -> dcm -> dcmDestination
none is not an allowed value (type=type_error.none.not_allowed)
payload -> 0 -> dcm -> dcmGrade
none is not an allowed value (type=type_error.none.not_allowed)
payload -> 0 -> dcm -> dcmSupplier
none is not an allowed value (type=type_error.none.not_allowed)
payload -> 0 -> dcm -> euiccid
none is not an allowed value (type=type_error.none.not_allowed)

To Reproduce
Steps to reproduce the behavior:

Run simple_client_example.py.

Expected behavior
Vehicle info output

Additional context
No more to add.

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

1 participant