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

Exception on Dashboard is_parking_light_supported #63

Closed
scoutice opened this issue Nov 23, 2022 · 3 comments
Closed

Exception on Dashboard is_parking_light_supported #63

scoutice opened this issue Nov 23, 2022 · 3 comments

Comments

@scoutice
Copy link
Contributor

See attached File
skodaconnect_exception.txt

########################################

Setting up dashboard

########################################
Traceback (most recent call last):
File "C:\Users\User.p2\pool\plugins\org.python.pydev.core_10.0.1.202210281537\pysrc\pydevd.py", line 3477, in
main()
File "C:\Users\User.p2\pool\plugins\org.python.pydev.core_10.0.1.202210281537\pysrc\pydevd.py", line 3470, in main
globals = debugger.run(setup['file'], None, None, is_module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User.p2\pool\plugins\org.python.pydev.core_10.0.1.202210281537\pysrc\pydevd.py", line 2507, in run
return self._exec(is_module, entry_point_fn, module_name, file, globals, locals)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User.p2\pool\plugins\org.python.pydev.core_10.0.1.202210281537\pysrc\pydevd.py", line 2514, in _exec
globals = pydevd_runpy.run_path(file, globals, 'main')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User.p2\pool\plugins\org.python.pydev.core_10.0.1.202210281537\pysrc_pydevd_bundle\pydevd_runpy.py", line 321, in run_path
return _run_module_code(code, init_globals, run_name,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User.p2\pool\plugins\org.python.pydev.core_10.0.1.202210281537\pysrc_pydevd_bundle\pydevd_runpy.py", line 135, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "C:\Users\User.p2\pool\plugins\org.python.pydev.core_10.0.1.202210281537\pysrc_pydevd_bundle\pydevd_runpy.py", line 124, in _run_code
exec(code, run_globals)
File "U:\Projekte\Raspberry PI\Workspace\WallboxController_Python\src\skoda_connect_example_1_1_26.py", line 293, in
loop.run_until_complete(main())
File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 650, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "U:\Projekte\Raspberry PI\Workspace\WallboxController_Python\src\skoda_connect_example_1_1_26.py", line 142, in main
dashboard = vehicle.dashboard(mutable=True, miles=MILES)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "U:\Projekte\Raspberry PI\Workspace\Github\scoutice_skodaconnect\skodaconnect\vehicle.py", line 1197, in dashboard
self._dashboard = Dashboard(self, **config)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "U:\Projekte\Raspberry PI\Workspace\Github\scoutice_skodaconnect\skodaconnect\dashboard.py", line 1422, in init
self.instruments = [
^
File "U:\Projekte\Raspberry PI\Workspace\Github\scoutice_skodaconnect\skodaconnect\dashboard.py", line 1425, in
if instrument.setup(vehicle, **config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "U:\Projekte\Raspberry PI\Workspace\Github\scoutice_skodaconnect\skodaconnect\dashboard.py", line 31, in setup
if not self.is_supported:
^^^^^^^^^^^^^^^^^
File "U:\Projekte\Raspberry PI\Workspace\Github\scoutice_skodaconnect\skodaconnect\dashboard.py", line 68, in is_supported
if hasattr(self.vehicle, supported):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "U:\Projekte\Raspberry PI\Workspace\Github\scoutice_skodaconnect\skodaconnect\vehicle.py", line 1374, in is_parking_light_supported
if 'overallStatus' in self.attrs.get('vehicle_remote', {}).get('lights', {}):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable

@scoutice
Copy link
Contributor Author

scoutice commented Nov 23, 2022

the whole section shall be surrounded by try-catch. if an exception is thrown, False shall be returned.
Following properties are corrupt and break the script, if the skoda-server returns invalid data:
is_parking_light_supported
is_hood_closed_supported
or - probably better, in the setup-method of the dashboard.

just to be sure the impact of the exception is as small as possible and the other sensors can work properly without breaking the whole dashboard

@scoutice
Copy link
Contributor Author

BTW: when this corrupt values of the skoda-server happen, also the skoda-app shows only "--" in the status of doors and lighting

@Farfar
Copy link
Collaborator

Farfar commented Nov 25, 2022

Fixed in 1.0.27

@Farfar Farfar closed this as completed Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants