More

Python error with OpenLayers plugin QGIS 2

Python error with OpenLayers plugin QGIS 2


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:UsersLee/.qgis2/python/pluginsopenlayers_pluginopenlayers_plugin.py", line 48, in addLayer self.plugin.addLayer(self) File "C:UsersLee/.qgis2/python/pluginsopenlayers_pluginopenlayers_plugin.py", line 194, in addLayer layer = OpenlayersLayer(self.iface, self.__coordRSGoogle, self.olLayerTypeRegistry) File "C:UsersLee/.qgis2/python/pluginsopenlayers_pluginopenlayers_layer.py", line 64, in __init self.page = OLWebPage() File "C:UsersLee/.qgis2/python/pluginsopenlayers_pluginopenlayers_layer.py", line 38, in init proxy = getProxy() File "C:UsersLee/.qgis2/python/pluginsopenlayers_plugin ools_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/pluginsprocessing', 'C:UsersLee.qgis2pythonpluginsGeoCoding', 'C:/PROGRA~1/QGISDU~1/apps/qgis/./python', 'C:UsersLee/.qgis2/python', 'C:UsersLee/.qgis2/python/plugins', 'C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins', 'C:PROGRA~1QGISDU~1inpython27.zip', 'C:PROGRA~1QGISDU~1appsPython27DLLs', 'C:PROGRA~1QGISDU~1appsPython27lib', 'C:PROGRA~1QGISDU~1appsPython27libplat-win', 'C:PROGRA~1QGISDU~1appsPython27liblib-tk', 'C:PROGRA~1QGISDU~1in', 'C:PROGRA~1QGISDU~1appsPython27', 'C:PROGRA~1QGISDU~1appsPython27libsite-packages', 'C:PROGRA~1QGISDU~1appsPython27libsite-packagesPIL', 'C:PROGRA~1QGISDU~1appsPython27libsite-packageswin32', 'C:PROGRA~1QGISDU~1appsPython27libsite-packageswin32lib', 'C:PROGRA~1QGISDU~1appsPython27libsite-packagesPythonwin', 'C:PROGRA~1QGISDU~1appsPython27libsite-packagesShapely-1.2.18-py2.7-win-amd64.egg', 'C:PROGRA~1QGISDU~1appsPython27libsite-packagessix-1.3.0-py2.7.egg', 'C:PROGRA~1QGISDU~1appsPython27libsite-packageswx-2.8-msw-unicode', 'C:PROGRA~1QGISDU~1appsPython27libsite-packagesxlrd-0.9.2-py2.7.egg', 'C:PROGRA~1QGISDU~1appsPython27libsite-packagesxlwt-0.7.5-py2.7.egg', 'C:UsersLee.qgis2pythonpluginsmmqgis/forms', 'C:PROGRA~1QGISDU~1appsqgispythonpluginsfTools ools']


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


Watch the video: Manage and Install Plugins in QGIS