3

I'm currently using QGIS 2.12.1-Lyon. I have installed the OpenLayers Plugin (and updated to the latest version, v1.3.6). However, when I go to load up base maps in QGIS using this plugin (go to Web | OpenLayers plugin, then select a map) QGIS always throws a Python error.

The same error is always thrown. Some maps load, but most do not. Not at all sure why. I am still able to use the Google Hybrid base map for example, but not Google Streets.

Error dump is shown below (have changed user names and private folders for privacy).

An error has occured while executing Python code:

AttributeError: 'OpenlayersLayer' object has no attribute 'geometryType'
Traceback (most recent call last):
  File "C:/Users/matlab/.qgis2/python/plugins\BLNExporter\BLNExp.py", line 208, in EnablePlugin
    if (layer.geometryType() == QGis.Polygon) or (layer.geometryType() == QGis.Line) or (layer.geometryType() == QGis.Point):
AttributeError: 'OpenlayersLayer' object has no attribute 'geometryType'


Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] 
QGIS version: 2.12.1-Lyon Lyon, 16760fd 

Python Path:
C:/Users/joebloggs/.qgis2/python/plugins\processing
C:/PROGRA~1/QGISLY~1/apps/qgis/./python
C:/Users/joebloggs/.qgis2/python
C:/Users/joebloggs/.qgis2/python/plugins
C:/PROGRA~1/QGISLY~1/apps/qgis/./python/plugins
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\site-packages\matplotlib-1.3.1-py2.7-win-amd64.egg
C:\Users\joebloggs\.qgis2\python\plugins\opengeo\ext-libs\requests-2.0.1-py2.7.egg
C:\Users\joebloggs\.qgis2\python\plugins\opengeo\ext-libs\python_dateutil-2.2-py2.7.egg
C:\Users\joebloggs\.qgis2\python\plugins\opengeo\ext-libs\six-1.9.0-py2.7.egg
C:\Users\joebloggs\.qgis2\python\plugins\opengeo\ext-libs\lxml-3.3.5-py2.7-win32.egg
C:\Users\joebloggs\.qgis2\python\plugins\opengeo\ext-libs\gsimporter-0.2-py2.7.egg
C:\Users\joebloggs\.qgis2\python\plugins\opengeo\ext-libs\httplib2-0.9-py2.7.egg
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\site-packages\nose-1.3.3-py2.7.egg
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\site-packages\tornado-4.0.1-py2.7-win-amd64.egg
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\site-packages\backports.ssl_match_hostname-3.4.0.2-py2.7.egg
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\site-packages\certifi-14.05.14-py2.7.egg
C:\PROGRA~1\QGISLY~1\bin\python27.zip
C:\PROGRA~1\QGISLY~1\apps\Python27\DLLs
C:\PROGRA~1\QGISLY~1\apps\Python27\lib
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\plat-win
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\lib-tk
C:\PROGRA~1\QGISLY~1\bin
C:\PROGRA~1\QGISLY~1\apps\Python27
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\site-packages
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\site-packages\PIL
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\site-packages\pytz-2012j-py2.7.egg
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\site-packages\win32
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\site-packages\win32\lib
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\site-packages\Pythonwin
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\site-packages\six-1.3.0-py2.7.egg
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\site-packages\wx-2.8-msw-unicode
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\site-packages\xlrd-0.9.2-py2.7.egg
C:\PROGRA~1\QGISLY~1\apps\Python27\lib\site-packages\xlwt-0.7.5-py2.7.egg
C:/Users/joebloggs/.qgis2//python
C:\Users\joebloggs\.qgis2\python\plugins\opengeo\ext-libs
C:\PROGRA~1\QGISLY~1\apps\qgis\python\plugins\fTools\tools
C:/Users/joebloggs/Documents/RandomFolder/RandomSubFolder
2
  • 1
    I've given up on OpenLayers for base maps and am now a convert to the QuickMapServices plugin. Has google layers, OSM layers, and many others. Directly accesses map tiles and is less buggy than OL. I know this doesn't fix the problem you are having but might be useful.
    – Spacedman
    Dec 3, 2015 at 11:55
  • Thanks, have done as suggested: QuickMapServices works very well.
    – RJK57
    Dec 4, 2015 at 9:02

1 Answer 1

2

This is a known issue which was recently logged here - the issue seems to be a recent 'map rollover' by google, which means the plugin author would need to make a code change. (In my case I don't get a crash, I just get a blank basemap)

I agree with @Spacedman suggestion to try QuickMapServices. It appears that all the Google tile services currently work with that plugin (I think the issue is Leaflet-related, which might explain the difference between the two plugins)

1
  • OK thank you very much, also thanks to @Spacedman. I have done as you suggested and installed QuickMapServices. It has lots of maps and works very well. Hopefully they can fix the bug in the OpenMapLayers plugin :)
    – RJK57
    Dec 4, 2015 at 9:01

Your Answer

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

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