Bug report #17624
i"nstall plugin from zip" stopped to work on Windows
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | Borys Jurgiel | ||
Category: | Plugin Manager | ||
Affected QGIS version: | master | Regression?: | Yes |
Operating System: | Windows | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 25521 |
Description
- Open plugin manager
- Install from ZIP
- Browse to plugin zipfile
- Install plugin
I get:
An error occurred during execution of following code: pyplugin_installer.instance().installFromZipFile('C:\Users\tchadwin\Downloads\qgis-latlontools-plugin.zip') File "", line 1 SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape Python version: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] QGIS version: 2.99.0-Master 'Master', 57dc9deb06 Python path: ['C:/OSGEO4~1/apps/qgis-dev/./python/plugins\\processing', 'C:/OSGEO4~1/apps/qgis-dev/./python', 'C:/Users/tchadwin/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python', 'C:/Users/tchadwin/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins', 'C:/OSGEO4~1/apps/qgis-dev/./python/plugins', 'C:\\OSGeo4W64\\bin\\python36.zip', 'C:\\OSGEO4~1\\apps\\Python36\\DLLs', 'C:\\OSGEO4~1\\apps\\Python36\\lib', 'C:\\OSGeo4W64\\bin', 'C:\\OSGEO4~1\\apps\\Python36', 'C:\\OSGEO4~1\\apps\\Python36\\lib\\site-packages', 'C:/Users/tchadwin/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python', 'C:/Users/tchadwin/Desktop']
Tested on qgis2web (Github master) and LatLong Tools (Github master)
Associated revisions
[Plugin manager] Use raw string for zip file path to avoid escaping '\U' in C:\Users. Fixes #17624
History
#1 Updated by Tom Chadwin about 7 years ago
Tested against QGIS 57dc9deb06
#2 Updated by Giovanni Manghi about 7 years ago
- Status changed from Open to Feedback
It works with other plugins, so seems something specific to the plugins you tested.
#3 Updated by Tom Chadwin about 7 years ago
If you can upload a known working zip (or link to one), I can test that.
#4 Updated by Giovanni Manghi about 7 years ago
Tom Chadwin wrote:
If you can upload a known working zip (or link to one), I can test that.
this
https://github.com/enricofer/go2mapillary/archive/master.zip
worked here on master/ubuntu.
#5 Updated by Tom Chadwin about 7 years ago
Same result with that zip:
An error occurred during execution of following code: pyplugin_installer.instance().installFromZipFile('C:\Users\tchadwin\Downloads\go2mapillary-master.zip') File "", line 1 SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape Python version: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] QGIS version: 2.99.0-Master 'Master', 57dc9deb06 Python path: ['C:/OSGEO4~1/apps/qgis-dev/./python/plugins\\processing', 'C:/OSGEO4~1/apps/qgis-dev/./python', 'C:/Users/tchadwin/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python', 'C:/Users/tchadwin/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins', 'C:/OSGEO4~1/apps/qgis-dev/./python/plugins', 'C:\\OSGeo4W64\\bin\\python36.zip', 'C:\\OSGEO4~1\\apps\\Python36\\DLLs', 'C:\\OSGEO4~1\\apps\\Python36\\lib', 'C:\\OSGeo4W64\\bin', 'C:\\OSGEO4~1\\apps\\Python36', 'C:\\OSGEO4~1\\apps\\Python36\\lib\\site-packages', 'C:/Users/tchadwin/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python', 'C:/Users/tchadwin/Desktop']
#6 Updated by Borys Jurgiel about 7 years ago
Giovanni, I'm pretty sure it's windows (backslash) thing.
#7 Updated by Giovanni Manghi about 7 years ago
- Priority changed from Normal to High
- Regression? changed from No to Yes
- Operating System changed from Windows 7 x64 to Windows
- Status changed from Feedback to Open
- Subject changed from Cannot install plugin from zip file to i"nstall plugin from zip" stopped to work on Windows
#8 Updated by Borys Jurgiel about 7 years ago
- % Done changed from 0 to 100
- Status changed from Open to Closed
Applied in changeset qgis|f180ea4454740ecf2fe8adf5ec53233a2888b0b8.
#9 Updated by Giovanni Manghi about 7 years ago
- Resolution set to fixed/implemented
#10 Updated by Borys Jurgiel about 7 years ago
Tom, could you please verify it tomorrow with the real build and reopen if necessary? I did some dummy tests and I believe it will work.
#11 Updated by Tom Chadwin about 7 years ago
Will do. Thanks!
#12 Updated by Borys Jurgiel about 7 years ago
For now, you can install from other directories - just avoid the "\U" special character (like in "C:\Users").
Ah, and when investigating the issue, I found a few other bugs and created #17626 . It seems the newly installed plugin is not included to the installed plugins list, so you can't tick the checkbox to enable it (btw. the fastest way to refresh the list is the Settings tab -> "Reload all repositories"). Feel free to add more annoying bugs there - I'm going to get down to it in a few days.
#13 Updated by Tom Chadwin about 7 years ago
Fix confirmed in 32ba5bf23f. Thanks very much, everyone!