Exeption in SHNG plugins.smartvisu on v3.3.0
Closed this issue · 1 comments
gruberth commented
The empty deprecated entry:
smartvisu/widgets/deprecated.yaml
Line 23 in 63747bb
causes the following error in the smartvisu autogeneration plugin of SmarthomeNG:
2022-12-19 21:40:46 ERROR plugins.smartvisu SmartVisuInstallWidgets v3.3.0: Exception: 'NoneType' object is not iterable
> Traceback (most recent call last):
> File "/usr/local/smarthome/plugins/smartvisu/__init__.py", line 123, in run
> sv_iwdg = SmartVisuInstallWidgets(self)
> File "/usr/local/smarthome/plugins/smartvisu/svinstallwidgets.py", line 55, in __init__
> self.install_widgets(self._sh)
> File "/usr/local/smarthome/plugins/smartvisu/svinstallwidgets.py", line 99, in install_widgets
> self.copy_widgets( plgdir.replace('.', '/') )
> File "/usr/local/smarthome/plugins/smartvisu/svinstallwidgets.py", line 149, in copy_widgets
> self.plugin_instance.test_widget_for_deprecated_widgets(os.path.join(srcdir, fn))
> File "/usr/local/smarthome/plugins/smartvisu/__init__.py", line 284, in test_widget_for_deprecated_widgets
> for widget_name in self.deprecated_widgets:
> TypeError: 'NoneType' object is not iterable
2022-12-19 21:40:46 ERROR plugins.smartvisu SmartVisuGenerator: Exception: 'NoneType' object is not iterable
> Traceback (most recent call last):
> File "/usr/local/smarthome/plugins/smartvisu/__init__.py", line 135, in run
> svgen = SmartVisuGenerator(self, self.visu_definition)
> File "/usr/local/smarthome/plugins/smartvisu/svgenerator.py", line 70, in __init__
> self.pages()
> File "/usr/local/smarthome/plugins/smartvisu/svgenerator.py", line 228, in pages
> self.plugin_instance.test_item_for_deprecated_widgets(item)
> File "/usr/local/smarthome/plugins/smartvisu/__init__.py", line 313, in test_item_for_deprecated_widgets
> for widget in self.deprecated_widgets:
> TypeError: 'NoneType' object is not iterable
Removing the deprecated line from the .yaml fixes the problem. I do not know if its better to remove it here or to add a is not None
check here
https://github.com/smarthomeNG/plugins/blob/c16df49c7136c52bcbba360897384b6d84126b9a/smartvisu/__init__.py#L252
in the plugin code.
wvhn commented
Thanks, Thomas!
I have transferred the issue to smarthomeNG and put a workaround (dummy entry) in the deprecated.yaml file leaving the version number v3.3 unchanged. There is also a thread in the forum documenting this.
Regards
Wolfram