UMEP-dev / UMEP

Urban Multi-scale Environmental Predictor
https://umep-docs.readthedocs.io/
59 stars 15 forks source link

UWG Processor (Processing Toolbox) error #399

Closed CsillaVG closed 4 months ago

CsillaVG commented 2 years ago

Trying to run UWG from the Processing Toolbox ends up in the processor hanging and the following python error message.

          File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/gui/AlgorithmDialog.py", line 273, in runAlgorithm
          'parameters': self.algorithm().asMap(parameters, self.context)
         Exception: unknown

Environment:

Thank you! Csilla

biglimp commented 2 years ago

Hm, looks like a Mac-error. Never seen this error before. Do yo happen to have a Windows PC close by to see if UWG works there? Do you have issues with any other UMEP-tools from the processing plugin on your Mac?

CsillaVG commented 2 years ago

Tested now on two Windows PCs. It took me a while to get them running, but UWG now runs on both well*. Regarding the Mac: I've tried a few things, but couldn't fix the above issue. All other UWG-related pre-processors work well.

biglimp commented 2 years ago

Thanks for info. When does this Mac error occur? When you open the tool or when you click run?

CsillaVG commented 2 years ago

After clicking on run. The UWG never finishes. It seems to be stuck in a loop with a status bar indicating that something is in progress. The standard 'python error occurred' message comes up immediately after pressing run and the above message is displayed in the Python error log. This is a warning level error. I accidentally have left out that part. I am sorry. :flushed:

biglimp commented 2 years ago

Can you open the Python console in QGIS and see if you have any additional messages there?

CsillaVG commented 2 years ago

Nothing. It is blank.

biglimp commented 2 years ago

Just to be shure, can you try from uwg import UWG in the QGIS Python console.

CsillaVG commented 2 years ago

Good you asked. I am new to using processing and the python console in QGIS. I did two things. (1) Installed QGIS 3.24.2 on another mac (macOS 10.14.6) with UMEP 3.19.3. It gives the same exact error when trying to run UWG using the UI. (2) used the UI of UWG to generate a python command and ran it in the python console. That worked like a charm.

biglimp commented 2 years ago

Ok, last test. Try to run UWG with the attached data, just to see if your input data is currupt. inputfilestest.zip

CsillaVG commented 2 years ago

I run it with your data, but the issue is the same: the UI is hanging and there is a python error message in the background.

BTW, the data that I am using are working on two windows QGIS/UMEP installs with UWG run via the UI. On the macs, I can only get UWG working as a python command.

I have tried one more thing: running UWG prepare via the Processing Toolbox UI (on the macs). This function works without a problem when run via the QGIS integrated UI interface (the drop-down menu). When trying it via the Processing Toolbox, it gives the same error as above.

biglimp commented 2 years ago

Ok. Maybe I missunderstood you. Does any other tool in UMEP for processing work, e.g. Shadow Generator, so NOT from the menu-based UMEP but from the Processing Toolbox? You can use the attached DSM to try it out. UTC=1 DSM_KRbig.zip

CsillaVG commented 2 years ago

No. I get the same error for trying to run the shadow generator as well.

biglimp commented 2 years ago

Aha! Now we are getting closer. Can you now try some other tools in the toolbox, e.g. Create Grid, Raster Information and see if these are working for you.

CsillaVG commented 2 years ago

Both ran just fine.

biglimp commented 2 years ago

Ok, so there is no issues in running niative processing tools. Now please try this. Download Raster Quantilizer from Manage and Install Plugins to check if this third party processing plugin works or fails for you.

CsillaVG commented 2 years ago

It worked.

biglimp commented 2 years ago

Sorry for making you trying all this but I have one more thing: Please download Potential Slope Failure for processing and use the attached data. This is another plugin from me and want to see if I am doing something wrong in general when I code these kind of plugins.

testdata.zip

CsillaVG commented 2 years ago

No problem. It run well, without any issue.

biglimp commented 2 years ago

Ok, thanks. Now I will see if I can find the issue. I will get back to you if I need you to try something more. Thanks Csilla!

CsillaVG commented 2 years ago

You are more then welcome. And the thank you is mine!

biglimp commented 2 years ago

Csilla, some updates. I examined the code and cannot see why it should not work for you. I also asked a colleague to try and for him is works. He has IOs 12.3 and QGIS 3.22.3. I asked him to update to 3.24 to see if the error appear.

CsillaVG commented 2 years ago

Thank you. I can also give a try to QGIS <3.24 this weekend.

CsillaVG commented 2 years ago

Update: UMEP processing runs well under QGIS 3.22.3 (both on iOS 10.14 and 11.15). However, for it to work, the pillow package needed to be upgraded on both systems.

biglimp commented 11 months ago

@CsillaVG , This issue might be outdated as new versions has arrived. Can I close? You can open a new issue if you experience the same issue on newer versions.