Bug report #8295

Installation of an experimental plugin (LecoS) crashes the plugin manager

Added by Asier Sarasua over 7 years ago. Updated over 7 years ago.

Status:Closed
Priority:Normal
Assignee:Borys Jurgiel
Category:Plugin Manager
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed
Crashes QGIS or corrupts data:No Copied to github as #:17091

Description

Steps:
1. Open QGIS
2. Go to "Plugins -> Manage and Install Plugins"
3. Mark "Show also experimental plugins" in "Settings"
4. Search for "LecoS" in "Get more"
5. Install plugin
6. A warning appears:
"Please install scipy (http://scipy.org/) in your QGIS Python path."
7. An error message appears, related to pyplugin_installer.instance().installPlugin('LecoS'), see "LecoS installation error 1.txt"
8. The GUI apparently freezes, but I am able to close QGIS
9. Open QGIS
10. The scipy warning again
11. Another error related this time to pyplugin_installer.initPluginInstaller(), see see "LecoS installation error 2.txt"
12. A third error related to pyplugin_installer.instance().showPluginManagerWhenReady()
13. Go to "Plugins -> Manage and Install Plugins". The plugin manager doesn't open.

Workaround to get the plugin manager again: remove the "LecoS" folder in ".qgis2\\python\\plugins"

LecoS_installation_error_1.txt Magnifier (3.33 KB) Asier Sarasua, 2013-07-14 03:05 AM

LecoS_installation_error_2.txt Magnifier (3.47 KB) Asier Sarasua, 2013-07-14 03:05 AM

LecoS_installation_error_3.txt Magnifier (3.65 KB) Asier Sarasua, 2013-07-14 03:05 AM

Associated revisions

Revision 7a7e5427
Added by Borys Jurgiel over 7 years ago

[Plugin Installer] Handle all exception types when loading plugins. Fixes #8295. Breaks string freeze because it's a critical fix.

History

#1 Updated by Asier Sarasua over 7 years ago

OS: Windows XP

#2 Updated by Asier Sarasua over 7 years ago

Sorry, the steps 12 an 13 are in the wrong order:

12. Go to "Plugins -> Manage and Install Plugins". The plugin manager doesn't open.
13. A third error related to pyplugin_installer.instance().showPluginManagerWhenReady()

#3 Updated by Giovanni Manghi over 7 years ago

  • Category set to Plugin Manager
  • Assignee set to Borys Jurgiel

Does this issue affects any plugin with a missing dependency or it is Lecos specific?

#4 Updated by Asier Sarasua over 7 years ago

I have installed the rest of the plugins (also the experimental ones) offered by the official plugin repository.
The only issue has been with Multitemporal Analyzer, which has warned me it is only compatible with QGIS 1.x, but I have accepted the installation and now I have it in a new section of the plugin manager called "Invalid". That doesn's affect the behaviour of the plugin manager window, like LecoS does.

#5 Updated by Martin Jung over 7 years ago

It might have sth. to do with the mandatory dependency scipy, which definitely has to be installed in your QGIS path.

To see if it is available just go to Plugins -> Python Console and enter

import scipy
scipy.version.version

This should give you an output of the version number without issues or import errors, otherwise you need to install scipy again.

I don't know however, why the QGIS plugin manager doesn't open anymore. This behavior didn't occur with the old plugin configuration dialog.

EDIT:
When looking into the second error file i found that the sys.exit(0) command is raised. This happens because of this check-routine at the start of the plugin.

try:
    import scipy
except ImportError:
    QMessageBox.critical(QDialog(),"LecoS: Warning","Please install scipy (http://scipy.org/) in your QGIS python path.")
    sys.exit(0)

You need to install scipy.

#6 Updated by Borys Jurgiel over 7 years ago

  • Status changed from Open to Closed

#7 Updated by Borys Jurgiel over 7 years ago

Thanks a lot for the investigation. The installer wasn't prepared to intercept raw exits from plugins. Now it should be safe. Btw. I've opened a ticket for Multitemporal Analyzer.

#8 Updated by Borys Jurgiel over 7 years ago

  • Resolution set to fixed

#9 Updated by Asier Sarasua over 7 years ago

Thank you Boris.

#10 Updated by Asier Sarasua over 7 years ago

Sorry, Borys. ;)

Also available in: Atom PDF