Skip to content

QGIS Cachement dialogue crashes due to python error #206

@niting3c

Description

@niting3c

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']

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions