You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The plugin installer downloads python plugins as a zip file. The code in qgis_plugins.py fails to unzip correctly if the top-level folder entry is not included in the zip.
It is possible to make a zip file with no top-level folder entry by doing:
zip foo.zip ./foo/*
instead of:
zip -r foo.zip ./foo
The code fails because it tries to create the directory hierarchy by looking for entries in the zip that end in '/'. If this isn't in the zip file then it then tries to extract a file to a non-existing directory, giving an error dialog that suggests (wrongly) it may be a permission problem.
Googling for python and unzip found the source of this code and some fixes in the comments.
There's a few 'try:except' clauses in the code that might be rewritten to return the exception so that a user gets more information when something fails.
Oh, and a line in installer_plugin.py that should maybe be:
plugindir = os.path.join(os.path.normpath(str(QgsApplication.qgisSettingsDirPath())), "python","plugins")
instead of concatenating path components.
The text was updated successfully, but these errors were encountered:
Author Name: browlingson - (browlingson -)
Original Redmine Issue: 890
Redmine category:python_plugins
Assignee: nobody -
The plugin installer downloads python plugins as a zip file. The code in qgis_plugins.py fails to unzip correctly if the top-level folder entry is not included in the zip.
It is possible to make a zip file with no top-level folder entry by doing:
zip foo.zip ./foo/*
instead of:
zip -r foo.zip ./foo
The code fails because it tries to create the directory hierarchy by looking for entries in the zip that end in '/'. If this isn't in the zip file then it then tries to extract a file to a non-existing directory, giving an error dialog that suggests (wrongly) it may be a permission problem.
Googling for python and unzip found the source of this code and some fixes in the comments.
There's a few 'try:except' clauses in the code that might be rewritten to return the exception so that a user gets more information when something fails.
Oh, and a line in installer_plugin.py that should maybe be:
plugindir = os.path.join(os.path.normpath(str(QgsApplication.qgisSettingsDirPath())), "python","plugins")
instead of concatenating path components.
The text was updated successfully, but these errors were encountered: