GIScience / orstools-qgis-plugin

Plugin for QGIS with a set of tools to use openrouteservice API´s, based on openstreetmap
https://plugins.qgis.org/plugins/ORStools/
MIT License
91 stars 31 forks source link

`TypeError: argument of type 'NoneType' is not iterable` since v1.7.0 #212

Closed IdrissaD closed 5 months ago

IdrissaD commented 5 months ago

Here's what I did

Trying to calculate a route since upgrading to last ORS Tools version (v1.7.0)

image

Point 0: 3.940661, 44.239974
Point 1: 3.941208, 44.239852
Point 2: 3.942292, 44.239086

Here's what I got

Following error and no calculated route:

TypeError: argument of type 'NoneType' is not iterable 
Traceback (most recent call last):
  File "C:\Users/idrissa.djepa-creutz/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\gui\ORStoolsDialog.py", line 251, in run_gui_control
    if my_new_path not in svg_paths:
TypeError: argument of type 'NoneType' is not iterable

Version de Python : 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] 
Version de QGIS : 3.28.5-Firenze Firenze, 50adba36f2 

Chemin Python :
C:/PROGRA~1/QGIS32~1.5/apps/qgis-ltr/./python
C:/Users/idrissa.djepa-creutz/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/idrissa.djepa-creutz/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS32~1.5/apps/qgis-ltr/./python/plugins
C:\PROGRA~1\QGIS32~1.5\apps\grass\grass82\etc\python
C:\Users\thomas.montagne\Documents
C:\Program Files\QGIS 3.28.5\bin\python39.zip
C:\PROGRA~1\QGIS32~1.5\apps\Python39\DLLs
C:\PROGRA~1\QGIS32~1.5\apps\Python39\lib
C:\Program Files\QGIS 3.28.5\bin
C:\PROGRA~1\QGIS32~1.5\apps\Python39
C:\PROGRA~1\QGIS32~1.5\apps\Python39\lib\site-packages
C:\PROGRA~1\QGIS32~1.5\apps\Python39\lib\site-packages\win32
C:\PROGRA~1\QGIS32~1.5\apps\Python39\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS32~1.5\apps\Python39\lib\site-packages\Pythonwin
C:/Users/idrissa.djepa-creutz/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:\Users\idrissa.djepa-creutz\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\vector_tiles_reader\ext-libs
C:/Users/idrissa.djepa-creutz/Documents/QGIS/projets

Here's what I was expecting

No error? And the generated route.

koebi commented 5 months ago

Hey, thank you for reporting.

Could you check if the fix works for you by changing C:\Users/idrissa.djepa-creutz/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\gui\ORStoolsDialog.py in line 251, adding the 5 characters or [] at the end of the line?

That'd be great - and the fastest way to fix this issue ;)

IdrissaD commented 5 months ago

Perfect! (and nice upgrade of the symbology of generated route)