sourcepole / qgis-openlayers-plugin

Openlayers plugin for QGIS
GNU General Public License v2.0
175 stars 108 forks source link

Problem with installing plugin (QGIS 2.99) #32

Closed scarabdesign closed 6 years ago

scarabdesign commented 7 years ago

I have built QGIS 2.99 from source and went looking for this plugin which a coworker was using on QGIS 2.4. According to this page, the max version of QGIS is 2.99, but when I try to load it (by downloading the zip and using "Install plugin from ZIP"), it gives the error pasted below. QGIS seems to be using Python 3; is this plugin compatible with Python 3? If not, is there a way I can downgrade Python that QGIS is using?

Couldn't load plugin 'openlayers_plugin' due to an error when calling its classFactory() method 

ImportError: cannot import name 'OpenlayersPlugin' 
Traceback (most recent call last):
  File "/usr/local/share/qgis/python/qgis/utils.py", line 337, in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/home/dev/.qgis3/python/plugins/openlayers_plugin/__init__.py", line 25, in classFactory
    from openlayers_plugin import OpenlayersPlugin
ImportError: cannot import name 'OpenlayersPlugin'

Python version: 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609] 
QGIS version: 2.99.0-Master Master, 258c872 

Python Path:
/usr/local/share/qgis/python/plugins/processing
/usr/local/share/qgis/python
/home/dev/.qgis3/python
/home/dev/.qgis3/python/plugins
/usr/local/share/qgis/python/plugins
/usr/lib/python35.zip
/usr/lib/python3.5
/usr/lib/python3.5/plat-x86_64-linux-gnu
/usr/lib/python3.5/lib-dynload
/home/dev/.local/lib/python3.5/site-packages
/usr/local/lib/python3.5/dist-packages
/usr/lib/python3/dist-packages
/home/dev/.qgis3//python
james2432 commented 7 years ago

Same thing for me as well

grgsolymosi commented 7 years ago

Same, please give us some information!

grgsolymosi commented 7 years ago

@scarabdesign @james2432 Has anybody here some workout?

james2432 commented 7 years ago

There's no work around. As most python developers... the code is not python 3 compatible. The develper needs to make it compatible before this is ever usable again

grgsolymosi commented 7 years ago

@james2432 OK, no matter as I soon as I can, I will change the code to conform to Python 3 my own. We can't know what's going on with the developer. I will inform you here when it will be fixed. Btw. how did you managed to solve the clustering for now?

djSupport commented 7 years ago

I'm on 2.18.11 it appeared to lose its modifcations somehow and on re-doing the actions it does not want to show a map anymore, it's not showing any errors

djSupport commented 7 years ago

Ah, damn sorry that was referring to the OS Map layer

pka commented 6 years ago

Will will port the plugin to QGIS 3.0 as soon as the API is stable. Probably after feature freeze.

pka commented 6 years ago

The port to QGIS 3 is tracked in #37

Karlheinzniebuhr commented 6 years ago

same issue

pka commented 6 years ago

The QGIS 3 port (see #37) requires a version >= 3.0.1