Saturday, 17 August 2019

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:\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']





Answer



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


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...