Bug ID 997368
Summary Application:Geo/qgis: Bug qgis-master-160801-1.6 breaks compatibility with some plugins
Classification openSUSE
Product openSUSE.org
Version unspecified
Hardware Other
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component 3rd party software
Assignee dassau@gbd-consult.de
Reporter dmitri.chubarov@gmail.com
QA Contact opensuse-communityscreening@forge.provo.novell.com
CC opensuse@dstoecker.de, tzotsos@gmail.com
Found By ---
Blocker ---

Created attachment 690938 [details]
a patch for the Python files

A recent change to QGIS Python interface "Rename QGis class to Qgis, for
capitalisation consistency" commited on July 21, 2016
(https://github.com/qgis/QGIS/commit/1a2231f10c65c2bef992e02046baebf3bc4975f6)
breaks some plugins that depend on qgis.core API.

For instance, the latest OpenLayers plugin version 1.4.1 fails to install with
the message "The plugin is broken. Python said: cannot import name QGis". This
happens because QGis class was renamed to Qgis.

A temporary solution for an end-user would be to install the plugin, ignore the
error message and replace all occurrences of QGis to Qgis in the files 

$HOME/.qgis-dev/python/plugins/openlayers_plugin/openlayers_plugin.py (6
occurrences)
$HOME/.qgis-dev/python/plugins/openlayers_plugin/openlayers_layer.py (1
occurrence)
$HOME/.qgis-dev/python/plugins/openlayers_plugin/weblayers/weblayer.py (2
occurrences)

There are 9 occurrences altogether.

A solution for plugin developers would be to catch ImportError on 

   from qgis.core import QGis

and import the class by its new name.

It is not clear what would be a good solution for packagers.


You are receiving this mail because: