SpaceGroupUCL / qgisSpaceSyntaxToolkit

Space Syntax Toolkit for QGIS
GNU General Public License v3.0
115 stars 40 forks source link

QGIS Cachement dialogue crashes due to python error #206

Open niting3c opened 1 year ago

niting3c commented 1 year ago

Python StackTrace error:

An error has occurred while executing Python code: 

TypeError: addItems(self, Iterable[str]): argument 1 has unexpected type 'str' 
Traceback (most recent call last):
  File "C:\Users/ASUS/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\esstoolkit\EssToolkit.py", line 276, in showCatchmentAnalyser
    self.catchment_tool.load_gui()
  File "C:\Users/ASUS/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\esstoolkit\catchment_analyser\CatchmentAnalyser.py", line 61, in load_gui
    self.updateLayers()
  File "C:\Users/ASUS/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\esstoolkit\catchment_analyser\CatchmentAnalyser.py", line 79, in updateLayers
    self.updateNetwork()
  File "C:\Users/ASUS/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\esstoolkit\catchment_analyser\CatchmentAnalyser.py", line 86, in updateNetwork
    self.updateCost()
  File "C:\Users/ASUS/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\esstoolkit\catchment_analyser\CatchmentAnalyser.py", line 97, in updateCost
    self.dlg.setCostFields(txt)
  File "C:\Users/ASUS/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\esstoolkit\catchment_analyser\catchment_analyser_dialog.py", line 149, in setCostFields
    self.costCombo.addItems('length')
TypeError: addItems(self, Iterable[str]): argument 1 has unexpected type 'str'

Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] 
QGIS version: 3.26.3-Buenos Aires Buenos Aires, 65e4edfdada 

Python Path:
C:/PROGRA~1/QGIS32~1.3/apps/qgis/./python
C:/Users/ASUS/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/ASUS/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS32~1.3/apps/qgis/./python/plugins
C:\PROGRA~1\QGIS32~1.3\bin\python39.zip
C:\PROGRA~1\QGIS32~1.3\apps\Python39\DLLs
C:\PROGRA~1\QGIS32~1.3\apps\Python39\lib
C:\PROGRA~1\QGIS32~1.3\bin
C:\PROGRA~1\QGIS32~1.3\apps\Python39
C:\PROGRA~1\QGIS32~1.3\apps\Python39\lib\site-packages
C:\PROGRA~1\QGIS32~1.3\apps\Python39\lib\site-packages\win32
C:\PROGRA~1\QGIS32~1.3\apps\Python39\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS32~1.3\apps\Python39\lib\site-packages\Pythonwin
C:/Users/ASUS/AppData/Roaming/QGIS/QGIS3\profiles\default/python

Fix: Fix the python 'length' to ['length']