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
63 stars 31 forks source link

[Bug]: Layers, Open the file browser (button) crashes the plugin #579

Closed josemvm closed 7 months ago

josemvm commented 7 months ago

What is the bug?

If the user click on the "Open the file browser" button and cancel the operation with "Cancel" button in the "Open media" window the plugin crash and this message appears:

An error has occurred while executing Python code:

ValueError: no path specified Traceback (most recent call last): File "C:\Users/ze_macau/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\lizmap\plugin.py", line 2922, in open_media_file_browser media_path = relpath(data_path, self.project.absolutePath()) File "C:\PROGRA~1\QGIS32~1.15\apps\Python39\lib\ntpath.py", line 694, in relpath raise ValueError("no path specified") ValueError: no path specified

Python version: 3.9.18 (heads/master:c290dc6, Jan 14 2024, 01:36:02) [MSC v.1929 64 bit (AMD64)] QGIS version: 3.28.15-Firenze Firenze, 252ad49ddc

Versions, safeguards, checks summary etc

Versions :

List of safeguards :
* Mode : normal * Allow parent folder : no * Prevent other drive : no * Prevent PG service : no * Prevent PG Auth DB : no * Force PG user&pass : no * Prevent ECW : no

Check Lizmap plugin