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.

Can anyone offer any other guidance?

I have also tried uninstall/ re-install.

Error code below:

An error has occurred while executing Python code:

Traceback (most recent call last): File "C:\Users\Lee/.qgis2/python/plugins\openlayers_plugin\openlayers_plugin.py", line 48, in addLayer self.plugin.addLayer(self) File "C:\Users\Lee/.qgis2/python/plugins\openlayers_plugin\openlayers_plugin.py", line 194, in addLayer layer = OpenlayersLayer(self.iface, self.__coordRSGoogle, self.olLayerTypeRegistry) File "C:\Users\Lee/.qgis2/python/plugins\openlayers_plugin\openlayers_layer.py", line 64, in __init self.page = OLWebPage() File "C:\Users\Lee/.qgis2/python/plugins\openlayers_plugin\openlayers_layer.py", line 38, in init proxy = getProxy() File "C:\Users\Lee/.qgis2/python/plugins\openlayers_plugin\tools_network.py", 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\python27.zip', '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']

  • Do you use the same browsers at work/home? Are the proxy settings identical?
    – rickhg12hs
    Commented Nov 22, 2013 at 2:16
  • Are you using OpenLayers Plugin version 1.1.1?
    – rickhg12hs
    Commented Nov 22, 2013 at 2:27
  • See if this workaround is successful.
    – rickhg12hs
    Commented Nov 22, 2013 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
    Commented Nov 22, 2013 at 7:26
  • 2
    @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
    Commented Nov 22, 2013 at 7:34

3 Answers 3


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


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.


I had the same problem and the solution was

settings>option>network (uncheck proxy)

And this was the end of my problem

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.