skodaconnect / myskoda

Python library for interacting with MySkoda APIs.
MIT License
9 stars 22 forks source link

Fatal error in 1.4.0 #33

Closed Prior99 closed 1 month ago

Prior99 commented 2 months ago
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 225, in get_vehicle
    vehicle.health = await self.get_health(vin)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/myskoda/myskoda.py", line 191, in get_health
    return await self.rest_api.get_health(vin)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/myskoda/rest_api.py", line 96, in get_health
    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 "<string>", line 3, in __mashumaro_from_json__
orjson.JSONDecodeError: unexpected character: line 1 column 1 (char 0)
dvx76 commented 1 month ago

Is this still relevant after the changes in #31 ?

Exceptions during deserialization should now result in the log message including the original response_text, right?

Prior99 commented 1 month ago

@dvx76 you're right.