Bug report #15543
Wrong Unicode handling of metadata plugin fields
|Affected QGIS version:||2.16.1||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||not reproducable|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||23466|
In QGIS versions 2.16 and above on Windows 10, the
description field of the
general section of
metadata.txt seems not to be properly decoded if it contains UTF-8 characters.
Please, find attached two versions of plugin SEC4QGIS . Version 1.0.2 has an Unicode character at the
description, which causes QGIS (if version >= 2.16) to crash when you run it after installing the plugin. I mean, you have to install the v1.0.2 plugin, run QGIS, close QGIS, and run QGIS again. This is the error message I get after that sequence:
An error occurred during execution of following code: import pyplugin_installer UnicodeEncodeError: 'ascii' codec can't encode character u'\\xf3' in position 36: ordinal not in range(128) Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] QGIS version: 2.16.2 'Nødebo', 979e1a2
And after clicking
Close then this window appears next:
An error occurred during execution of following code: pyplugin_installer.initPluginInstaller() Traceback (most recent call last): File "", line 1, in NameError: name 'pyplugin_installer' is not defined Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] QGIS version: 2.16.2 'Nødebo', 979e1a2
If you try SEC4QGIS v1.0.3 it will run without problems, and the only difference between both versions (apart from the PDF help file) is on
Curiously enough, this bug does not affect some other fields like
about, which also contains Unicode characters on both versions of the plugin.
It does not affect version 2.14 either.