0

Exporting qgis2web map with OpenLayers completes with no error.. but with Leaflet it ends with following errors..

An error has occurred while executing Python code: 

IndexError: 1 
Traceback (most recent call last):
  File "/home/user/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/qgis2web/maindialog.py", line 350, in saveMap
    feedback=self.feedback)
  File "/home/user/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/qgis2web/leafletWriter.py", line 101, in write
    folder=dest_folder)
  File "/home/user/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/qgis2web/leafletWriter.py", line 272, in writeLeaflet
    useVT, useShapes, useOSMB)
  File "/home/user/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/qgis2web/leafletLayerScripts.py", line 127, in writeVectorLayer
    useShapes, feedback)
  File "/home/user/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/qgis2web/leafletStyleScripts.py", line 65, in getLayerStyle
    sl, useMapUnits, feedback)
  File "/home/user/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/qgis2web/leafletStyleScripts.py", line 180, in getSymbolAsStyle
    sl = symbol.symbolLayer(sl)
IndexError: 1


Python version: 3.7.3 (default, Nov 10 2011, 15:00:00) [GCC 8.3.0] 
QGIS version: 3.10.3-A Coruña A Coruña, 0e1f8464 

Python Path:
/app/share/qgis/python
/home/user/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python
/home/user/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins
/app/share/qgis/python/plugins
/usr/lib/python37.zip
/usr/lib/python3.7
/usr/lib/python3.7/lib-dynload
/usr/lib/python3.7/site-packages
/app/lib/python3.7/site-packages
/app/lib/python3.7/site-packages/numpy-1.14.3-py3.7-linux-x86_64.egg
/app/lib/python3.7/site-packages/MarkupSafe-1.0-py3.7-linux-x86_64.egg
/home/user/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python
/home/user/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/qgis2web
/home/user/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins
/home/user/Documents/Web Map

Why it is happening??

0

Could this be because you are using a categorized/graduated/rule-based renderer, and different symbols within the renderer have different numbers of symbol layers? This is an existing limitation/bug in Leaflet exports:

https://github.com/tomchadwin/qgis2web/issues/828

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.