[Qgis-user] QGIS2web crash
Stephen Sacks
ssacks456 at gmail.com
Mon Sep 29 15:42:00 PDT 2025
QGIS2web problem.
My map has two layers (trees and shrubs). If both layers use a single
svg marker everything looks as it should, both on my desktop and when I
export to the web (Leaflet). But if one layer (shrubs) uses
categorized svg markers then qgis2web crashes when I click Export (see
attached error message). The crash occurs even if all six categories use
the same svg file (which is the same svg which works smoothly in the
single marker, i.e., not-categorized, case). The error message says
can't find 'chosen/ShrubPoss1_green.svg' , which is a reference to a
folder and file which I had used earlier but don't use now. I recreated
both the folder and the file just so they can satisfy some software bug
that failed to clear some buffer, but that does solve my problem.
I'm using QGIS2web(version 3.29.0) and running QGIS v3.40.10 Bratislava
on Windows 11.
Any advice would be most welcome. Thanks in advance for your time.
Steve
-------------- next part --------------
An error has occurred while executing Python code:
FileNotFoundError: [Errno 2] No such file or directory: 'chosen/ShrubPoss1_green.svg'
Traceback (most recent call last):
File "C:\Users/steph/AppData/Roaming/QGIS/QGIS3\profiles\my-new-profile/python/plugins\qgis2web\maindialog.py", line 519, in saveMap
results = writer.write(self.iface,
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/steph/AppData/Roaming/QGIS/QGIS3\profiles\my-new-profile/python/plugins\qgis2web\leafletWriter.py", line 94, in write
self.preview_file = self.writeLeaflet(
^^^^^^^^^^^^^^^^^^
File "C:\Users/steph/AppData/Roaming/QGIS/QGIS3\profiles\my-new-profile/python/plugins\qgis2web\leafletWriter.py", line 293, in writeLeaflet
useOSMB) = writeVectorLayer(layer, safeLayerName,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/steph/AppData/Roaming/QGIS/QGIS3\profiles\my-new-profile/python/plugins\qgis2web\leafletLayerScripts.py", line 127, in writeVectorLayer
useShapes) = getLayerStyle(layer, safeLayerName, interactive,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/steph/AppData/Roaming/QGIS/QGIS3\profiles\my-new-profile/python/plugins\qgis2web\leafletStyleScripts.py", line 64, in getLayerStyle
pattern) = getSymbolAsStyle(cat.symbol(), markerFolder,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/steph/AppData/Roaming/QGIS/QGIS3\profiles\my-new-profile/python/plugins\qgis2web\leafletStyleScripts.py", line 244, in getSymbolAsStyle
f = open(sl.path())
^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'chosen/ShrubPoss1_green.svg'
Python version: 3.12.11 (main, Jun 17 2025, 13:41:12) [MSC v.1943 64 bit (AMD64)]
QGIS version: 3.40.10-Bratislava Bratislava, c98da2e682
Python Path:
C:/PROGRA~1/QGIS 3.40.10/apps/qgis-ltr/./python
C:/Users/steph/AppData/Roaming/QGIS/QGIS3\profiles\my-new-profile/python
C:/Users/steph/AppData/Roaming/QGIS/QGIS3\profiles\my-new-profile/python/plugins
C:/PROGRA~1/QGIS 3.40.10/apps/qgis-ltr/./python/plugins
C:\PROGRA~1\QGIS 3.40.10\apps\grass\grass84\etc\python
C:\Users\steph\Documents
C:\Program Files\QGIS 3.40.10\bin\python312.zip
C:\PROGRA~1\QGIS 3.40.10\apps\Python312\DLLs
C:\PROGRA~1\QGIS 3.40.10\apps\Python312\Lib
C:\Program Files\QGIS 3.40.10\bin
C:\Users\steph\AppData\Roaming\Python\Python312\site-packages
C:\PROGRA~1\QGIS 3.40.10\apps\Python312
C:\PROGRA~1\QGIS 3.40.10\apps\Python312\Lib\site-packages
C:\PROGRA~1\QGIS 3.40.10\apps\Python312\Lib\site-packages\win32
C:\PROGRA~1\QGIS 3.40.10\apps\Python312\Lib\site-packages\win32\lib
C:\PROGRA~1\QGIS 3.40.10\apps\Python312\Lib\site-packages\Pythonwin
C:/Users/steph/AppData/Roaming/QGIS/QGIS3\profiles\my-new-profile/python
C:\Users\steph\AppData\Roaming\QGIS\QGIS3\profiles\my-new-profile\python\plugins
C:/Promenade/GIS/data/projects
More information about the QGIS-User
mailing list