Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

After I install the OpenLayer Plugin (1.0.0) on my QGIS 1.9 this error appears:

Konnte Erweiterung openlayers_plugin nicht laden wegen eines Fehler beim Aufruf seiner initGui()-Methode

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 198, in startPlugin
    plugins[packageName].initGui()
  File "/home/map/.qgis//python/plugins/openlayers_plugin/openlayers_plugin.py", line 160, in initGui
    if not self.__setCoordRSGoogle():
  File "/home/map/.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.3 (default, Sep 26 2012, 21:53:55) 
[GCC 4.7.2]


QGIS-Version:
1.9.0-Master Master, exported

Python-Pfad: ['/home/map/.qgis//python/plugins/sextante', '/usr/share/qgis/python', '/home/map/.qgis//python', '/home/map/.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/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode', '/home/map/.qgis/python/plugins/qgis2kml', '/home/map/.qgis/python/plugins/qgis2kml', '/usr/share/qgis/python', '/usr/share/qgis/python/plugins/fTools/tools']

Any ideas? Thanks!

Martin

share|improve this question
1  
This is most likely a bug coming from the latest PyQgis API Changes. hub.qgis.org/wiki/quantum-gis/API_changes_for_version_20 –  Curlew Jan 9 '13 at 20:46

2 Answers 2

up vote 3 down vote accepted

As said to the post above, recently some methods in API have been removed so, if you can not wait for the next version what you have to do is replace this file into

{home}/.qgis/python/plugins/openlayers_plugin
the patch works both for 1.8 version that master version.

share|improve this answer
    
Thanks! Works perfect! –  MAP Jan 10 '13 at 16:00
1  
You should mention that non-Github-experienced users should click on the "Raw" button to get the text version of the file. –  AndreJ Jan 14 '13 at 16:04

Replacing the file does not work for me: Couldn't load plugin openlayers_plugin due an error when calling its classFactory() method I downloaded the file from the link given above and replaced it in the directory tree.

My fix was to use the same file from http://hub.qgis.org/issues/6979 which worked fine.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.