WAGIS / wap_plugin

GNU General Public License v3.0
4 stars 2 forks source link

Python error when trying to download WaPOR products #46

Closed moadAlami closed 4 months ago

moadAlami commented 4 months ago

Steps to reproduce

  1. Go to extensions
  2. Click on WAPlugin
  3. Click on Water Accounting and Productivity Plugin
  4. Sign in using WaPOR2 API key
  5. Go to WaPOR2 Catalog
  6. Set "Workspace" to WAPOR_2
  7. Set "Time Frame From" 2022
  8. Set "Time Frame Until" to 2023
  9. Set "Output path"
  10. Set "Name"
  11. Click "Download"

Expected result: Download the "Gross Biomass Water" layer.

Actual result An error has occurred while executing Python code:

TypeError: setValue(self, value: int): argument 1 has unexpected type 'float' Traceback (most recent call last): File "/home/mouad/.local/share/QGIS/QGIS3/profiles/default/python/plugins/wap_plugin/wap_plugin.py", line 898, in downloadCroppedRaster self.dlg.progressBar.setValue(progress_value) TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'

Python version: 3.12.3 (main, Apr 23 2024, 09:16:07) [GCC 13.2.1 20240417] QGIS version: 3.36.2-Maidenhead Maidenhead, exported

Python Path: /usr/share/qgis/python /home/mouad/.local/share/QGIS/QGIS3/profiles/default/python /home/mouad/.local/share/QGIS/QGIS3/profiles/default/python/plugins /usr/share/qgis/python/plugins /usr/lib/python312.zip /usr/lib/python3.12 /usr/lib/python3.12/lib-dynload /usr/lib/python3.12/site-packages /home/mouad/.local/share/QGIS/QGIS3/profiles/default/python /home/mouad/.local/share/QGIS/QGIS3/profiles/default/python/plugins/kmltools/libs

Versions

Software Version
QGIS version 3.36.2-Maidenhead
QGIS code branch Release 3.36
Qt version 5.15.13
Python version 3.12.3
GDAL/OGR version 3.8.5
PROJ version 9.4.0
EPSG Registry database version v11.004 (2024-02-24)
GEOS version 3.12.1-CAPI-1.18.1
SQLite version 3.45.3
PDAL version 2.7.1
PostgreSQL client version 16.2
SpatiaLite version 5.1.0
QWT version 6.2.0
QScintilla2 version 2.14.1
OS version Arch Linux

Active Python plugins

Plugin Name Version
wap_plugin 3.0.1
latlontools 3.6.20
quick_map_services 0.19.34
kmltools 3.1.33
odktrace2wkt 0.1
MetaSearch 0.3.6
processing 2.12.99
db_manager 0.1.20
grassprovider 2.12.99
fhfonsecaa commented 4 months ago

Hi @moadAlami thanks for the detailed issue report. Could you please provide us also a screenshot of the UI so we can also mimic the filters used?

moadAlami commented 4 months ago

Thanks for your response. Here is the screenshot

2024-05-15-101540_1920x1080_scrot

fhfonsecaa commented 4 months ago

Hi @moadAlami thanks for the report. I tested it out and for me is working: image I would recommend you to reinstall the latest version. Maybe there is some conflict in there. Nevertheless, the line where the error is reported might be problematic in the future, so we will make it more robust for the next patch release. Thanks for your support!

@akshaydr would you mind to try also you to see if it fails on your computer?

moadAlami commented 4 months ago

I got WaPOR 2 working on Windows, but not on Linux. WaPOR 3 works fine.

fhfonsecaa commented 4 months ago

Hi @moadAlami thank you again for the support. I addressed the problem you reported, I believe this should solve the issue in both platforms.

I made a patch release with the fix, so you can find the new version in the plugin manager.

If you have any other problem feel free to open a new issue.