3liz / lizmap-plugin

Lizmap plugin for QGIS, allowing to publish QGIS maps to Lizmap Web Client
https://www.lizmap.com/
GNU General Public License v2.0
61 stars 30 forks source link

[Bug]: Python error about vsicurl when saving CFG file #541

Closed Gustry closed 6 months ago

Gustry commented 6 months ago

What is the bug?

Python error in a project having a COG layer :

OSError: [WinError 123] La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte: '\\vsicurl\\https:\\XXXXXX.lizmap.com\\YYYY\\cog\\ZZZ.tif'
Traceback (most recent call last):
File "C:/Users//AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\lizmap\plugin.py", line 3851, in save_cfg_file_cursor
return self.save_cfg_file()
File "C:/Users//AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\lizmap\plugin.py", line 4013, in save_cfg_file
if not self.write_project_config_file(lwc_version, with_gui):
File "C:/Users//AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\lizmap\plugin.py", line 2930, in write_project_config_file
liz2json = self.project_config_file(lwc_version, with_gui)
File "C:/Users//AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\lizmap\plugin.py", line 3044, in project_config_file
lizmap_cloud=lizmap_cloud,
File "C:/Users//AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\lizmap\project_checker_tools.py", line 99, in project_safeguards_checks
if not layer_path.exists():
File "C:\OSGEO4~1\apps\Python37\lib\pathlib.py", line 1318, in exists
self.stat()
File "C:\OSGEO4~1\apps\Python37\lib\pathlib.py", line 1140, in stat
return self._accessor.stat(self)
OSError: [WinError 123] La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte: '\\vsicurl\\https:\\XXX.lizmap.com\\YYY\\cog\\ZZZ.tif'

Versions

Master

Check Lizmap plugin

Gustry commented 6 months ago

Fixed with 62e900fd2978284ffef17fd076cc410a53783507