Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#206 Update catchment_analyser_dialog.py #205

Merged
merged 2 commits into from
Apr 28, 2023

Conversation

niting3c
Copy link
Contributor

@niting3c niting3c commented Apr 28, 2023

Issue: #206

Fix error for catchment dialogue box.
Fix : sending the correct argument , same as line 146.

StackTrace for the 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 error for catchment dialogue box.
Fix : sending the correct argument , same as line 146.

StackTrace for the 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
D:/UNIVERSITY COLLEGE LONDON/OneDrive - University College London/ADRP/FINAL ANALYSIS/CATCHMENT ANALYSIS
```
@niting3c
Copy link
Contributor Author

Linking the Issue: #206

@niting3c niting3c changed the title Update catchment_analyser_dialog.py #206 Update catchment_analyser_dialog.py Apr 28, 2023
Fixing error:

An error has occurred while executing Python code: 

AttributeError: 'NoneType' object has no attribute 'popActiveLayers' 
Traceback (most recent call last):
  File "C:\Users/ASUS/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\esstoolkit\network_segmenter\network_segmenter_tool.py", line 130, in updateLayers
    self.dlg.popActiveLayers(layers)
AttributeError: 'NoneType' object has no attribute 'popActiveLayers'


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
@jorgegil jorgegil merged commit 7a94268 into SpaceGroupUCL:master Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants