Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/", line 198, in startPlugin
  File "/home/map/.qgis//python/plugins/openlayers_plugin/", line 160, in initGui
    if not self.__setCoordRSGoogle():
  File "/home/map/.qgis//python/plugins/openlayers_plugin/", 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? Thanks!


share|improve this question
This is most likely a bug coming from the latest PyQgis API Changes. – Curlew Jan 9 '13 at 20:46
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

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
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 which worked fine.

share|improve this answer

Your Answer


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.