Bug report #14947
Plugin's syntax errors in __init__.py are not reported
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||end of life|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||22896|
If a plugin's init.py has a syntax error in it, QGIS will report a cryptic error in
startPlugin() function in
utils.py instead of giving the real error:
AttributeError: 'module' object has no attribute 'classFactory'
It seems that first attempt to import a package with syntax error will trigger an exception, however subsequent imports will not fail (and will return a broken package's module).
Most likely it is plugin installer which is too eager to see if any plugins are broken by trying to import all plugins, even if they are not enabled. Apart from this issue, this may be causing slow QGIS startup in presence of many plugins.
#2 Updated by Giovanni Manghi 10 months ago
- Resolution set to end of life
- Status changed from Open to Closed
End of life notice: QGIS 2.18 LTR