skodaconnect / myskoda

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

ValueError: 'LICENSE_EXPIRED' is not a valid CapabilityStatus #75

Closed scoutice closed 1 month ago

scoutice commented 1 month ago

ERROR:myskoda.rest_api:Failed to load data from url /v2/garage/vehicles/VINVINVIN?connectivityGenerations=MOD1&connectivityGenerations=MOD2&connectivityGenerations=MOD3&connectivityGenerations=MOD4. Return value was '{"vin":"TMBVINVINVINVINVIN,"name":"Mein Enyaq","workshopModeEnabled":false,"licensePlate":"xxxxxx","state":"ACTIVATED","devicePlatform":"WCAR","softwareVersion":"3.0","specification":{"title":"Škoda Enyaq","manufacturingDate":"2021-04-08","model":"Enyaq","modelYear":"2021","body":"SUV","systemCode":"UNKNOWN","systemModelId":"5AZJJ2","maxChargingPowerInKW":125,"battery":{"capacityInKWh":77},"engine":{"type":"iV","powerInKW":150},"gearbox":{"type":"E1H"}},"servicePartner":{"servicePartnerId":"xxxxx"},"renders":[{"url":"https://iprenders.blob.core.windows.net/base5azs21200210/2Y2YFPQpW8TAD5-cRLexWrAB7HkqZiEz5n-PmprHKDiLh7U62wcV0ft94aRkFx-drAYkiRCUwxmWuHJPNMqn-19201080dayvext_side1080.png","viewPoint":"exterior_side","type":"REAL","order":0},{"url":"https://ip-modcwp.azureedge.net/modcwp5azs21200210/2Y2YFPQpW8TAD5-cRLexWrAB7HkqZiEz5n-PmprHKDiLh7U62wcV0ft94aRkFx-drAYkiRCUwxmWuHJPNMqn-1920658dayvext_side1080.png?v=638182953970000000","viewPoint":"garage_l","type":"REAL","order":1},{"url":"https://ip-modcwp.azureedge.net/modcwp5azs21200210/2Y2YFPQpW8TAD5-cRLexWrAB7HkqZiEz5n-PmprHKDiLh7U62wcV0ft94aRkFx-drAYkiRCUwxmWuHJPNMqn-700390dayvext_front1080.png?v=637859721980000000","viewPoint":"main","type":"REAL","order":2}],"compositeRenders":[{"layers":[{"url":"https://iprenders.blob.core.windows.net/base5azs21200210/2Y2YFPQpW8TAD5-cRLexWrAB7HkqZiEz5n-PmprHKDiLh7U62wcV0ft94aRkFx-drAYkiRCUwxmWuHJPNMqn-19201080dayvext_side1080.png","viewPoint":"exterior_side","type":"REAL","order":0}],"viewType":"UNMODIFIED_EXTERIOR_SIDE"},{"layers":[{"url":"https://iprenders.blob.core.windows.net/base5azs21200210/2Y2YFPQpW8TAD5-cRLexWrAB7HkqZiEz5n-PmprHKDiLh7U62wcV0ft94aRkFx-drAYkiRCUwxmWuHJPNMqn-19201080dayvext_side1080.png","viewPoint":"exterior_side","type":"REAL","order":0}],"modifications":{"adjustSpaceInPx":{"top":-317,"bottom":-193,"left":-149,"right":-111},"densityIndependentHeight":270,"flipHorizontal":false,"anchorTo":"LEFT"},"viewType":"HOME"},{"layers":[{"url":"https://iprenders.blob.core.windows.net/base5azs21200210/2Y2YFPQpW8TAD5-cRLexWrAB7HkqZiEz5n-PmprHKDiLh7U62wcV0ft94aRkFx-drAYkiRCUwxmWuHJPNMqn-19201080dayvext_side1080.png","viewPoint":"exterior_side","type":"REAL","order":0},{"url":"https://mspgwlivestorage.blob.core.windows.net/renders/cables/enyaq_5A_cable_charging_light_v1.png","viewPoint":"exterior_side","type":"REAL","order":1}],"modifications":{"adjustSpaceInPx":{"top":-317,"bottom":-193,"left":-149,"right":-111},"densityIndependentHeight":270,"flipHorizontal":true,"anchorTo":"LEFT"},"viewType":"CHARGING_LIGHT"},{"layers":[{"url":"https://iprenders.blob.core.windows.net/base5azs21200210/2Y2YFPQpW8TAD5-cRLexWrAB7HkqZiEz5n-PmprHKDiLh7U62wcV0ft94aRkFx-drAYkiRCUwxmWuHJPNMqn-19201080dayvext_side1080.png","viewPoint":"exterior_side","type":"REAL","order":0},{"url":"https://mspgwlivestorage.blob.core.windows.net/renders/cables/enyaq_5A_cable_charging_dark_v1.png","viewPoint":"exterior_side","type":"REAL","order":1}],"modifications":{"adjustSpaceInPx":{"top":-317,"bottom":-193,"left":-149,"right":-111},"densityIndependentHeight":270,"flipHorizontal":true,"anchorTo":"LEFT"},"viewType":"CHARGING_DARK"},{"layers":[{"url":"https://iprenders.blob.core.windows.net/base5azs21200210/2Y2YFPQpW8TAD5-cRLexWrAB7HkqZiEz5n-PmprHKDiLh7U62wcV0ft94aRkFx-drAYkiRCUwxmWuHJPNMqn-19201080dayvext_side1080.png","viewPoint":"exterior_side","type":"REAL","order":0},{"url":"https://mspgwlivestorage.blob.core.windows.net/renders/cables/enyaq_5A_cable_plugged_in_light_v1.png","viewPoint":"exterior_side","type":"REAL","order":1}],"modifications":{"adjustSpaceInPx":{"top":-317,"bottom":-193,"left":-149,"right":-111},"densityIndependentHeight":270,"flipHorizontal":true,"anchorTo":"LEFT"},"viewType":"PLUGGED_IN_LIGHT"},{"layers":[{"url":"https://iprenders.blob.core.windows.net/base5azs21200210/2Y2YFPQpW8TAD5-cRLexWrAB7HkqZiEz5n-PmprHKDiLh7U62wcV0ft94aRkFx-drAYkiRCUwxmWuHJPNMqn-19201080dayvext_side1080.png","viewPoint":"exterior_side","type":"REAL","order":0},{"url":"https://mspgwlivestorage.blob.core.windows.net/renders/cables/enyaq_5A_cable_plugged_in_dark_v1.png","viewPoint":"exterior_side","type":"REAL","order":1}],"modifications":{"adjustSpaceInPx":{"top":-317,"bottom":-193,"left":-149,"right":-111},"densityIndependentHeight":270,"flipHorizontal":true,"anchorTo":"LEFT"},"viewType":"PLUGGED_IN_DARK"}],"capabilities":{"capabilities":[{"id":"AUTOMATION","statuses":[]},{"id":"BATTERY_CHARGING_CARE","statuses":[]},{"id":"BATTERY_SUPPORT","statuses":[]},{"id":"CHARGING_PROFILES","statuses":[]},{"id":"CHARGING_STATIONS","statuses":["LICENSE_EXPIRED"]},{"id":"DIGICERT","statuses":["LICENSE_EXPIRED"]},{"id":"MAP_UPDATE","statuses":["LICENSE_EXPIRED"]},{"id":"MEASUREMENTS","statuses":["LICENSE_EXPIRED"]},{"id":"PARKING_INFORMATION","statuses":["LICENSE_EXPIRED"]},{"id":"PARKING_POSITION","statuses":["LICENSE_EXPIRED"]},{"id":"POI_SEARCH","statuses":["LICENSE_EXPIRED"]},{"id":"ROADSIDE_ASSISTANT","statuses":[]},{"id":"ROUTING","statuses":["LICENSE_EXPIRED"]},{"id":"STATE","statuses":["LICENSE_EXPIRED"]},{"id":"TRAFFIC_INFORMATION","statuses":["LICENSE_EXPIRED"]},{"id":"VEHICLE_HEALTH_INSPECTION","statuses":[]},{"id":"WARNING_LIGHTS","statuses":["LICENSE_EXPIRED"]},{"id":"WEB_RADIO","statuses":[]},{"id":"AIR_CONDITIONING_TIMERS","statuses":[]},{"id":"AIR_CONDITIONING_SMART_SETTINGS","statuses":[]},{"id":"POWERPASS_TARIFFS","statuses":[]},{"id":"AIR_CONDITIONING_SAVE_AND_ACTIVATE","statuses":[]},{"id":"CUBIC","statuses":[]},{"id":"ROUTE_PLANNING_5_CHARGERS","statuses":[]},{"id":"SUBSCRIPTIONS","statuses":[]},{"id":"DESTINATIONS","statuses":["LICENSE_EXPIRED"]},{"id":"CHARGING_MEB","statuses":[]},{"id":"VEHICLE_SERVICES_BACKUPS","statuses":[]},{"id":"EV_ROUTE_PLANNING","statuses":[]},{"id":"CHARGE_MODE_SELECTION","statuses":[]},{"id":"DIGICERT","statuses":["LICENSE_EXPIRED"]},{"id":"VEHICLE_HEALTH_WARNINGS","statuses":[]},{"id":"PAY_TO_PARK","statuses":["LICENSE_EXPIRED"]},{"id":"ONLINE_SPEECH_GPS","statuses":[]},{"id":"GUEST_USER_MANAGEMENT","statuses":[]},{"id":"DESTINATION_IMPORT_UPGRADABLE","statuses":[]},{"id":"SERVICE_PARTNER","statuses":[]},{"id":"WINDOW_HEATING","statuses":[]},{"id":"CHARGING","statuses":[]},{"id":"AIR_CONDITIONING","statuses":[]},{"id":"EXTENDED_CHARGING_SETTINGS","statuses":[]},{"id":"VEHICLE_WAKE_UP_TRIGGER","statuses":["LICENSE_EXPIRED"]}]}}' Traceback (most recent call last): File "", line 15, in mashumaro_from_dict File "C:\Program Files\Python312\Lib\enum.py", line 757, in call return cls.new(cls, value) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python312\Lib\enum.py", line 1171, in new raise ve_exc ValueError: 'LICENSE_EXPIRED' is not a valid CapabilityStatus

scoutice commented 1 month ago
class CapabilityStatus(StrEnum):
    DEACTIVATED_BY_ACTIVE_VEHICLE_USER = "DEACTIVATED_BY_ACTIVE_VEHICLE_USER"
    DISABLED_BY_USER = "DISABLED_BY_USER"
    INITIALLY_DISABLED = "INITIALLY_DISABLED"
    INSUFFICIENT_BATTERY_LEVEL = "INSUFFICIENT_BATTERY_LEVEL"
    LICENSE_MISSING = "LICENSE_MISSING"
    LOCATION_DATA_DISABLED = "LOCATION_DATA_DISABLED"
    FRONTEND_SWITCHED_OFF = "FRONTEND_SWITCHED_OFF"
    --> LICENSE_EXPIRED = "LICENSE_EXPIRED" <--
WebSpider commented 1 month ago

This is added in v0.6.2, what version are you running?

scoutice commented 1 month ago

oh. sorry. my fault. i was on the main branch but on a 5 days old commit-hash. can beclosed