UMEP-dev / UMEP-processing

7 stars 9 forks source link

Python error when running the Morphometric Calculator (Point) algorithm #67

Closed lkarch closed 3 months ago

lkarch commented 3 months ago

Hello,

I have an issue when running the "Urban Morphology: Morphometric Calculator (Point)" model. Everytime I run the model I get the following error:

Traceback (most recent call last): File "/Users/user/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/preprocessor/imagemorphparmspoint_algorithm.py", line 247, in processAlgorithm immorphresult = morph.imagemorphparam_v2(dsm, dem, scale, 1, degree, feedback, 1) File "/Users/user/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/util/imageMorphometricParms_v2.py", line 100, in imagemorphparam_v2 lineMid = a[0:imidy,imid] IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

This is the case when using QGIS 3.34.4 on MacOS and QGIS 3.28.9 on Windows 10
with UMEP for processing version 2.0.13

Here is a screenshot of the dialog box:

Capture d’écran 2024-03-20 à 15 49 02
biglimp commented 3 months ago

Please attach your geodata (DSM,DEM and flux tower) for testing.

lkarch commented 3 months ago

Here are the link to the geodata I used: https://enacshare.epfl.ch/dvLydJZUjoT26atPQFqM5

biglimp commented 3 months ago

This was indeed a bug. I fixed and uploaded a new version 2.0.23 to the repo. It will probably be while before you can see the new version in the official QGIS plugin repo but you can download from here in the meantime.

lkarch commented 3 months ago

Thank you! Which file exactly should I download?

biglimp commented 3 months ago

You download as a zip-file as explained here https://umep-docs.readthedocs.io/en/latest/Getting_Started.html#installing-development-release-could-be-unstable.

lkarch commented 3 months ago

Thank you very much!