Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

I've been using QGIS for a while but since using QGIS 2 the OpenLayers plugin doesn't work for me on my home pc. (However, I have installed the same version at my workplace with success.) I have looked through other posts, and tried setting the crs and allowing on the fly but it doesn't work for me.
Please can anyone offer any other guidance? I have also tried uninstall/ re-install.

Error code below:

An error has occured while executing Python code:

Traceback (most recent call last): File "C:\Users\Lee/.qgis2/python/plugins\openlayers_plugin\", line 48, in addLayer self.plugin.addLayer(self) File "C:\Users\Lee/.qgis2/python/plugins\openlayers_plugin\", line 194, in addLayer layer = OpenlayersLayer(self.iface, self.__coordRSGoogle, self.olLayerTypeRegistry) File "C:\Users\Lee/.qgis2/python/plugins\openlayers_plugin\", line 64, in __init = OLWebPage() File "C:\Users\Lee/.qgis2/python/plugins\openlayers_plugin\", line 38, in init proxy = getProxy() File "C:\Users\Lee/.qgis2/python/plugins\openlayers_plugin\", line 42, in getProxy proxy.setPort(settings.value("/proxyPort", 10, type=int)) TypeError: unable to convert a QVariant of type 10 to a QMetaType of type 2

Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]

QGIS version: 2.0.1-Dufour Dufour, d94c044

Python path: ['C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\processing', 'C:\Users\Lee\.qgis2\python\plugins\GeoCoding', 'C:/PROGRA~1/QGISDU~1/apps/qgis/./python', 'C:\Users\Lee/.qgis2/python', 'C:\Users\Lee/.qgis2/python/plugins', 'C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins', 'C:\PROGRA~1\QGISDU~1\bin\', 'C:\PROGRA~1\QGISDU~1\apps\Python27\DLLs', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\plat-win', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\lib-tk', 'C:\PROGRA~1\QGISDU~1\bin', 'C:\PROGRA~1\QGISDU~1\apps\Python27', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\PIL', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\win32', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\win32\lib', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\Pythonwin', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\six-1.3.0-py2.7.egg', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\xlrd-0.9.2-py2.7.egg', 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\xlwt-0.7.5-py2.7.egg', 'C:\Users\Lee\.qgis2\python\plugins\mmqgis/forms', 'C:\PROGRA~1\QGISDU~1\apps\qgis\python\plugins\fTools\tools']

share|improve this question
Do you use the same browsers at work/home? Are the proxy settings identical? – rickhg12hs Nov 22 '13 at 2:16
Are you using OpenLayers Plugin version 1.1.1? – rickhg12hs Nov 22 '13 at 2:27
See if this workaround is successful. – rickhg12hs Nov 22 '13 at 2:34
@rickhg12hs Ill check the proxy at work, but have noted that I can access the plugin in QGIS 1.8 but not in QGIS 2. – Lee Nov 22 '13 at 7:26
@rickhg12hs I looked at your workaround, and played with the proxy settings. Unchecking the 'Use proxy for web access' box in options allowed the plugin to work for me at home. Thanks for your help! – Lee Nov 22 '13 at 7:34
up vote 6 down vote accepted

If the OpenLayers plugin fails with an error in 'getProxy', verify that the proxy settings in the options menu are correct.

share|improve this answer
Had the same problem too and I approve the answer above. Just uncheck "use a proxy" and it works! – shamrock Mar 22 at 11:32

FIY, the QGIS dev are thinking about deprecating the OpenLayers plugin in favor of QuickMapServices (already available in the extensions)

Why? It's mainly an outdated plugin you should avoid. It was useful some years ago but it doesn't deal well with projections.

share|improve this answer

I had the same problem and the solution was

settings>option>network (uncheck proxy)

And this was the end of my problem

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.