nens / threedi-api-qgis-client

3Di Models & Simulations plugin
https://plugins.lizard.net/
Other
2 stars 0 forks source link

progress bar error on upload schematisation on linux #477

Open daanvaningen opened 1 year ago

daanvaningen commented 1 year ago

Contact Details

daan.vaningen@nelen-schuurmans.nl

Complexity

easy

Priority

medium prio

What happened?

progress bar error on upload schematisation on linux

TypeError: setValue(self, int): argument 1 has unexpected type 'float' 
Traceback (most recent call last):
  File "/home/daan/.local/share/QGIS/QGIS3/profiles/default/python/plugins/threedi_models_and_simulations/widgets/upload_overview.py", line 82, in on_upload_context_change
    self.on_update_upload_progress(self.current_upload_row, *self.upload_progresses[self.current_upload_row])
  File "/home/daan/.local/share/QGIS/QGIS3/profiles/default/python/plugins/threedi_models_and_simulations/widgets/upload_overview.py", line 185, in on_update_upload_progress
    self.pbar_current_task.setValue(task_progress)
TypeError: setValue(self, int): argument 1 has unexpected type 'float'

Python version: 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] 
QGIS version: 3.30.3-'s-Hertogenbosch 's-Hertogenbosch, c006973ad1

Local fix:

self.pbar_current_task.setValue(int(task_progress))
self.pbar_total_upload.setValue(int(total_progress))

How to Reproduce?

Upload a schematisation on linux, Python version: 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] QGIS version: 3.30.3-'s-Hertogenbosch 's-Hertogenbosch, c006973ad1

What did you expect and what was the actual result?

no error and smooth sailing

Add screenshots, video's etc

No response

Relevant log output

TypeError: setValue(self, int): argument 1 has unexpected type 'float' 
Traceback (most recent call last):
  File "/home/daan/.local/share/QGIS/QGIS3/profiles/default/python/plugins/threedi_models_and_simulations/widgets/upload_overview.py", line 82, in on_upload_context_change
    self.on_update_upload_progress(self.current_upload_row, *self.upload_progresses[self.current_upload_row])
  File "/home/daan/.local/share/QGIS/QGIS3/profiles/default/python/plugins/threedi_models_and_simulations/widgets/upload_overview.py", line 185, in on_update_upload_progress
    self.pbar_current_task.setValue(task_progress)
TypeError: setValue(self, int): argument 1 has unexpected type 'float'

Python version: 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] 
QGIS version: 3.30.3-'s-Hertogenbosch 's-Hertogenbosch, c006973ad1


### Additional info

:unicorn: