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

Key 'hood' not available #56

Closed
Dominik-Koenig opened this issue Sep 18, 2021 · 3 comments · Fixed by #57
Closed

Key 'hood' not available #56

Dominik-Koenig opened this issue Sep 18, 2021 · 3 comments · Fixed by #57
Labels

Comments

@Dominik-Koenig
Copy link

Dominik-Koenig commented Sep 18, 2021

Describe the bug
Information about the status of the hood is not available for my car, this results in the following error:

Traceback (most recent call last):
  File "fetch.py", line 87, in <module>
    loop.run_until_complete(get_information())
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "fetch.py", line 26, in get_information
    vehicle = await client.get_vehicle_status(car)
  File "/usr/local/lib/python3.8/dist-packages/mytoyota/client.py", line 120, in get_vehicle_status
    car = Vehicle(
  File "/usr/local/lib/python3.8/dist-packages/mytoyota/vehicle.py", line 192, in __init__
    Status(status["protectionState"])
  File "/usr/local/lib/python3.8/dist-packages/mytoyota/vehicle.py", line 112, in __init__
    self.doors = Doors(status[HOOD], status[DOORS])
KeyError: 'hood'

To Reproduce
Steps to reproduce the behavior:
Execute the sample script of this repository.

Additional context
Response of the request:

{'overallStatus': 'OK', 'timestamp': '2021-09-17T18:12:40Z', 'doors': {'warning': False, 'driverSeatDoor': {'warning': False, 'closed': True, 'locked': True}, 'passengerSeatDoor': {'warning': False, 'closed': True, 'locked': True}, 'rearRightSeatDoor': {'warning': False, 'closed': True, 'locked': True}, 'rearLeftSeatDoor': {'warning': False, 'closed': True, 'locked': True}, 'backDoor': {'warning': False, 'closed': True, 'locked': True}}, 'lamps': {'warning': False, 'headLamp': {'warning': False, 'off': True}, 'tailLamp': {'warning': False, 'off': True}, 'hazardLamp': {'warning': False, 'off': True}}, 'windows': {'warning': False, 'driverSeatWindow': {'warning': False, 'state': 'close'}, 'passengerSeatWindow': {'warning': False, 'state': 'close'}, 'rearRightSeatWindow': {'warning': False, 'state': 'close'}, 'rearLeftSeatWindow': {'warning': False, 'state': 'close'}}, 'key': {'warning': False, 'inCar': False}, 'lock': {'lockState': 'locked', 'source': 'key', 'failedUnlockPreconditions': []}}

Car: Toyota Yaris model 2021

@DurgNomis-drol
Copy link
Owner

DurgNomis-drol commented Sep 18, 2021

I will see if I can find time to look at it later today, it should be a simple fix. Feel free to make a contribution if you can't wait. 😊

Thanks for reporting the issue. 😊

@DurgNomis-drol
Copy link
Owner

New version have been published. Please try upgrading to 0.6.2 😃

@Dominik-Koenig
Copy link
Author

Can confirm that it's working now, thank you! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants