Error on EnMAP-Box start if WMS is opened in QGIS

Issue #122 closed
Franz Schug created an issue

If there is a WMS opened in QIS (also Google Earth or OSM layer), EnMAP-Box won't start. Error message:

An error has occurred while executing Python code:

RuntimeError: type=xyz&url=http://mt0.google.com/vt/lyrs%3Dy%26hl%3Den%26x%3D%7Bx%7D%26y%3D%7By%7D%26z%3D%7Bz%7D%26s%3DGa&zmax=18&zmin=0' does not exist in the file system, and is not recognized as a supported dataset name. Traceback (most recent call last): File "C:/Users/schugfrx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\enmapboxplugin.py", line 126, in run self.enmapBox = EnMAPBox(self.iface) File "C:/Users/schugfrx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\gui\enmapboxgui.py", line 184, in __init__ self.dataSourceManager = DataSourceManager() File "C:/Users/schugfrx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\gui\datasourcemanager.py", line 1006, in __init__ self.updateFromQgsProject() File "C:/Users/schugfrx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\gui\datasourcemanager.py", line 1075, in updateFromQgsProject added = [self.addSource(lyr) for lyr in mapLayers] File "C:/Users/schugfrx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\gui\datasourcemanager.py", line 1075, in added = [self.addSource(lyr) for lyr in mapLayers] File "C:/Users/schugfrx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\gui\datasourcemanager.py", line 1136, in addSource newDataSources = DataSourceFactory.Factory(newDataSource, name=name, icon=icon) File "C:/Users/schugfrx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\gui\datasources.py", line 243, in Factory ds = gdal.Open(uri) File "C:\Users\schugfrx\osgeo4w\apps\Python36\lib\site-packages\osgeo\gdal.py", line 2914, in Open return _gdal.Open(*args) RuntimeError:type=xyz&url=http://mt0.google.com/vt/lyrs%3Dy%26hl%3Den%26x%3D%7Bx%7D%26y%3D%7By%7D%26z%3D%7Bz%7D%26s%3DGa&zmax=18&zmin=0' does not exist in the file system, and is not recognized as a supported dataset name.

Python version: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] QGIS version: 3.0.3-Girona Girona, 8a899c8758

Possibly, check for those layers and ignore them when loading the box?

Comments (3)

  1. Log in to comment