opengisch / qgis-swiss-locator

Swiss Geoadmin layer and feature search for QGIS 3
https://www.opengis.ch/2024/06/25/swiss-locator-plugin-3-0-is-here-with-exciting-features/
GNU General Public License v3.0
11 stars 4 forks source link

FileNotFoundError when opening QGIS #51

Closed leojat closed 1 month ago

leojat commented 1 year ago

I have just updated from 1.4.9 to 2.0.4 on QGIS 3.16.16, and I have the following error when launching QGIS:

Traceback (most recent call last):
  File "C:\Users/.../AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\swiss_locator\core\filters\swiss_locator_filter_wmts.py", line 98, in handle_capabilities_response
    self.capabilities = ET.parse(self.content.filePath()).getroot()
  File "C:\PROGRA~1\QGIS31~1.16\apps\Python39\lib\xml\etree\ElementTree.py", line 1229, in parse
    tree.parse(source, parser)
  File "C:\PROGRA~1\QGIS31~1.16\apps\Python39\lib\xml\etree\ElementTree.py", line 569, in parse
    source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory: ''

Once QGIS is open, in the Locator bar tab of the Messages window, I have the following info:

INFO    SwissLocatorFilterWMTS: 0
INFO    SwissLocatorFilterWMTS: Swisstopo capabilities has been downloaded. Reading from 
gacarrillor commented 1 month ago

@leojat, thanks for the report.

I have been unable to replicate the issue. We'll add another check to avoid that this can happen again.

If you get the error in the future (shouldn't really happen), feel free to reopen the issue.