Bug report #6979

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

Added by Andy Wood over 1 year ago. Updated over 1 year ago.

Status:Closed Start Date:01/10/2013
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:-
Target version:-
Platform: Patch supplied:No
Platform version: Affected version:master
Status info: Causes crash or corruption:No
Resolution: Tag:

Description

Using openlayers_plugin 1.0.0

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

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 198, in startPlugin
plugins[packageName].initGui()
File "/home/agw/.qgis//python/plugins/openlayers_plugin/openlayers_plugin.py", line 160, in initGui
if not self.__setCoordRSGoogle():
File "/home/agw/.qgis//python/plugins/openlayers_plugin/openlayers_plugin.py", line 211, in _setCoordRSGoogle
if not self.
_coordRSGoogle.createFromEpsg(idEpsgRSGoogle):
AttributeError: 'QgsCoordinateReferenceSystem' object has no attribute 'createFromEpsg'

Python version:
2.7.3rc2 (default, Apr 22 2012, 22:55:44)
[GCC 4.6.3]

QGIS version:
1.9.0-Master Master, 4ddcb3e

Python path: ['/home/agw/.qgis/python/plugins/GeoCoding', '/usr/share/qgis/python', '/home/agw/.qgis//python', '/home/agw/.qgis//python/plugins', '/usr/share/qgis/python/plugins', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']

buttonGitHub.png (3.9 kB) Salvatore Larosa, 01/12/2013 10:14 am

openlayers_plugin.py (10 kB) Salvatore Larosa, 01/12/2013 10:14 am


Related issues

duplicates OpenLayers Plugin - Bug report #6916: QgsCoordinateReferenceSystem object has no attribute crea... Closed 12/23/2012

History

Updated by Salvatore Larosa over 1 year ago

  • Status changed from Open to Closed

duplicate of #6916

two possible workarounds at the moment:
1. http://goo.gl/yR0JE
2. apply this patch http://goo.gl/S9UkZ

Updated by stefano campus over 1 year ago

in my case, first method doesn't work

Impossibile caricare il plugin openlayers a causa di errore chiamando il metodo classFactory()

Traceback (most recent call last):
File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 189, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:/Documents and Settings/11186CS/.qgis//python/plugins\openlayers\__init__.py", line 48, in classFactory
from openlayers_plugin import OpenlayersPlugin
File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 438, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Documents and Settings/11186CS/.qgis//python/plugins\openlayers\openlayers_plugin.py", line 4

^
SyntaxError: invalid syntax

Versione Python:
2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]

Versione di QGIS:
1.9.0-Master Master, be94fb7

Updated by Salvatore Larosa over 1 year ago

very odd, it should work !
Have you selected "Raw" before of saved the file to plugin directory ?

Updated by stefano campus over 1 year ago

forgive me, salvatore, i don't understand wthat do you mean with "raw"
i see another user who has same difficulty (http://gis.stackexchange.com/questions/46645/openlayers-plugin-and-qgis-1-9-error-after-install).

Updated by Salvatore Larosa over 1 year ago

stefano campus wrote:

forgive me, salvatore, i don't understand wthat do you mean with "raw"

I am aware that was not a good advice !! :-)
Anyway, I meant the button on github (see attached image)

i see another user who has same difficulty (http://gis.stackexchange.com/questions/46645/openlayers-plugin-and-qgis-1-9-error-after-install).

Could you give a try with the attached py file ?

Updated by Giovanni Manghi over 1 year ago

Salvatore Larosa wrote:

stefano campus wrote:

forgive me, salvatore, i don't understand wthat do you mean with "raw"

I am aware that was not a good advice !! :-) Anyway, I meant the button on github (see attached image)

i see another user who has same difficulty (http://gis.stackexchange.com/questions/46645/openlayers-plugin-and-qgis-1-9-error-after-install).

Could you give a try with the attached py file ?

with the attached patched file the plugin works as expected, can someone make a push with the maintainers to have the plugin updated?

Updated by J├╝rgen Fischer over 1 year ago

Giovanni Manghi wrote:

with the attached patched file the plugin works as expected, can someone make a push with the maintainers to have the plugin updated?

Please follow up in the plugin's ticket #6916 - this ticket is closed.

Also available in: Atom PDF