After I installed the OpenLayers 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
  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'

2.7.3 (default, Sep 26 2012, 21:53:55) 
[GCC 4.7.2]

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?


2 Answers 2


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

the patch works both for 1.8 version that master version.

  • 1
    You should mention that non-Github-experienced users should click on the "Raw" button to get the text version of the file.
    – AndreJ
    Commented Jan 14, 2013 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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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