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

unexpected error prédictive maintenance #33

Closed
seborix opened this issue Sep 25, 2024 · 4 comments
Closed

unexpected error prédictive maintenance #33

seborix opened this issue Sep 25, 2024 · 4 comments
Assignees
Labels
library Depending on fix in myskoda library

Comments

@seborix
Copy link

seborix commented Sep 25, 2024

in 1.4.1
unexpected error and faild to load data due to error field prédictive maintenance

Enregistreur: myskoda.rest_api
Source: /usr/local/lib/python3.12/site-packages/myskoda/rest_api.py:43
S'est produit pour la première fois: 21:45:00 (4 occurrences)
Dernier enregistrement: 21:45:46

Failed to load data from url /v3/vehicle-maintenance/vehicles/TMBJB7NY3PF085106. Return value was '{"maintenanceReport":{"capturedAt":"2024-09-25T18:50:49.768Z","inspectionDueInDays":518,"mileageInKm":9659},"preferredServicePartner":{"name":"NOUVELLE EXCEL AUTO","brand":"C","partnerNumber":"02169","id":"FRAC02169","contact":{"phone":"+33xxxxxxxxxx","url":"https://concessionnaires.skoda.fr/ille-et-vilaine-35/nouvelle-excel-auto-364"},"address":{"street"xxxxxxxx:"Ruexxxxxx","zipCode":"xxxxx","city":"xxxxxx","countryCode":"FRA"},"location":{"latitude":48.105877,"longitude":-1.7444667},"openingHours":[{"periodStart":"MONDAY","periodEnd":"FRIDAY","openingTimes":[{"from":"08:00:00","to":"12:15:00"},{"from":"14:00:00","to":"18:00:00"}]},{"periodStart":"SATURDAY","periodEnd":"SUNDAY","openingTimes":[]}]},"predictiveMaintenance":{"setting":{"serviceActivated":true,"email":"[email protected]","phone":"+33xxxxxxxxx"}}}'
Traceback (most recent call last):
File "", line 8, in mashumaro_from_dict_json
File "", line 12, in mashumaro_from_dict_json
mashumaro.exceptions.MissingField: Field "preferred_channel" of type CommunicationChannel is missing in PredictiveMaintenanceSettings instance

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 17, in mashumaro_from_json
File "", line 10, in mashumaro_from_dict_json
mashumaro.exceptions.InvalidFieldValue: Field "setting" of type PredictiveMaintenanceSettings in PredictiveMaintenance has invalid value {'serviceActivated': True, 'email': '[email protected]', 'phone': '+33xxxxxwxx'}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/myskoda/rest_api.py", line 41, in _make_get_request
data = deserialize(response_text)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 19, in mashumaro_from_json
mashumaro.exceptions.InvalidFieldValue: Field "predictive_maintenance" of type Optional[PredictiveMaintenance] in Maintenance has invalid value {'setting': {'serviceActivated': True, 'email': '[email protected]', 'phone': '+33xxxxxxx'}}

and
Cette erreur provient d'une intégration personnalisée

Enregistreur: custom_components.myskoda.coordinator
Source: helpers/update_coordinator.py:354
intégration: MySkoda (documentation, problèmes)
S'est produit pour la première fois: 21:45:00 (4 occurrences)
Dernier enregistrement: 21:45:46

Unexpected error fetching myskoda data
Traceback (most recent call last):
File "", line 8, in mashumaro_from_dict_json
File "", line 12, in mashumaro_from_dict_json
mashumaro.exceptions.MissingField: Field "preferred_channel" of type CommunicationChannel is missing in PredictiveMaintenanceSettings instance

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 17, in mashumaro_from_json
File "", line 10, in mashumaro_from_dict_json
mashumaro.exceptions.InvalidFieldValue: Field "setting" of type PredictiveMaintenanceSettings in PredictiveMaintenance has invalid value {'serviceActivated': True, 'email': '[email protected]', 'phone': '+33xxxxxxx'}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/myskoda/coordinator.py", line 82, in _async_update_data
vehicle = await self.myskoda.get_vehicle(self.vin)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/myskoda/myskoda.py", line 204, in get_vehicle
maintenance = await self.get_maintenance(vin)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/myskoda/myskoda.py", line 187, in get_maintenance
return await self.rest_api.get_maintenance(vin)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/myskoda/rest_api.py", line 90, in get_maintenance
return await self._make_get_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/myskoda/rest_api.py", line 41, in _make_get_request
data = deserialize(response_text)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 19, in mashumaro_from_json
mashumaro.exceptions.InvalidFieldValue: Field "predictive_maintenance" of type Optional[PredictiveMaintenance] in Maintenance has invalid value {'setting': {'serviceActivated': True, 'email': '[email protected]', 'phone': '+33xxxxx'}}

@dvx76
Copy link
Member

dvx76 commented Sep 26, 2024

Should be fixed by skodaconnect/myskoda#40

@dvx76 dvx76 self-assigned this Sep 26, 2024
@seborix
Copy link
Author

seborix commented Sep 26, 2024

ok thanks
in the future version it will be ok that s it?
sorry for my english i m french

@WebSpider
Copy link
Contributor

Yes, it will be fixed in the next release of the integration

@WebSpider WebSpider added the library Depending on fix in myskoda library label Sep 27, 2024
@WebSpider
Copy link
Contributor

This has been fixed in v1.4.2

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

No branches or pull requests

3 participants