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

1.19.0 fails to initialize #570

Closed
dtmichel opened this issue Jan 14, 2025 · 8 comments · Fixed by #571
Closed

1.19.0 fails to initialize #570

dtmichel opened this issue Jan 14, 2025 · 8 comments · Fixed by #571
Assignees
Labels
bug Something isn't working

Comments

@dtmichel
Copy link

dtmichel commented Jan 14, 2025

Describe the bug
The integration fails to initialize.

Is this working in MySkoda app?*
Yes

Latest working release
1.18.0

Debug logs

Error setting up entry [email protected] for myskoda
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/myskoda/init.py", line 95, in async_setup_entry
cached_vins: list = entry.data[VINLIST]
~~~~~~~~~~^^^^^^^^^
KeyError: 'vins'

@dtmichel dtmichel added the bug Something isn't working label Jan 14, 2025
@WebSpider WebSpider self-assigned this Jan 14, 2025
@WebSpider
Copy link
Contributor

This is related to #502

@WebSpider
Copy link
Contributor

I am unable to reproduce this here. Can you see if you can set your logging to debug and restart the integration?

@prvakt
Copy link
Collaborator

prvakt commented Jan 14, 2025

same here

Fist I have just updated and got migration error message but there was no error in the log
Afterwards deleted my hub and created again with very same error as above

@dtmichel
Copy link
Author

I enabled the debug mode for the integration and restarted Home Assistant, as I was not able to restart only the integration. The option to do so was not available. The additional restart of HA seems to have fixed the migration error for the MySkoda integration. Now it appears that the Skoda API is down, as all sensors are unavailable and the API returns errors:

Logger: myskoda.rest_api
Source: /usr/local/lib/python3.13/site-packages/myskoda/rest_api.py:105
First occurred: 11:08:42 (3 occurrences)
Last logged: 11:08:57
Invalid status for GET request to /v1/charging/my-vin: 500
Invalid status for GET request to /v2/vehicle-status/my-vin: 500
Invalid status for GET request to /v1/vehicle-health-report/warning-lights/my-vin: 500
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/myskoda/rest_api.py", line 99, in _make_request
response.raise_for_status()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/aiohttp/client_reqrep.py", line 1161, in raise_for_status
raise ClientResponseError(
...<5 lines>...
)
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url='https://mysmob.api.connect.skoda-auto.cz/api/v1/charging/my-vin'

Logger: myskoda.myskoda
Source: custom_components/myskoda/coordinator.py:468
integration: MySkoda (documentation, issues)
First occurred: 11:11:23 (2 occurrences)
Last logged: 11:12:05
Requesting CHARGING failed: 500, message='Internal Server Error', url='https://mysmob.api.connect.skoda-auto.cz/api/v1/charging/my-vin', continue
Requesting VEHICLE_HEALTH_INSPECTION failed: 500, message='Internal Server Error', url='https://mysmob.api.connect.skoda-auto.cz/api/v1/vehicle-health-report/warning-lights/my-vin', continue

So, it appears the restart fixed the issue but Skoda API is down. The App is not working either.

@prvakt
Copy link
Collaborator

prvakt commented Jan 14, 2025

@WebSpider found the problem - VINLIST is not initialized, line 95 in __init__.py must be changed to cached_vins: list = entry.data.get(VINLIST, [])

@prvakt
Copy link
Collaborator

prvakt commented Jan 14, 2025

or I was just lucky and problem was fixed independetly from my code change?

@WebSpider
Copy link
Contributor

Ah, found the issue. The migration of the config schema was incomplete. I will fix this, and apply the suggestion from @prvakt just to be sure.

@WebSpider
Copy link
Contributor

This should be fixed with v1.19.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants