jorgealmerio / valuetool

QGis plugin to display in a table or plot the values from the visible raster layers at the current mouse position
4 stars 7 forks source link

ValueError: Unknown format code 'f' for object of type 'str' #29

Closed florianneukirchen closed 5 months ago

florianneukirchen commented 5 months ago

I updated the plugin to version 3.0.18 and without using it, I got the following exception.

Also note that my python console is flooded with: '{:.2f},{:.2f}' It seems you forgot to remove a print() that was used for debugging.

ValueError: Unknown format code 'f' for object of type 'str' Traceback (most recent call last): File "/home/riannek/.local/share/QGIS/QGIS3/profiles/default/python/plugins/valuetool/valuewidget.py", line 478, in printValue self.labelStatus.setText(self.tr('Coordinate:') + strFmt.format(position.x(), position.y(),bandvalue)) ValueError: Unknown format code 'f' for object of type 'str'

Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] QGIS version: 3.36.0-Maidenhead Maidenhead, 09951dc0acf

Python Path: /home/riannek/.local/share/QGIS/QGIS3/profiles/default/python/plugins/scipy_filters /home/riannek/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qgis_nearest_greater /usr/share/qgis/python /home/riannek/.local/share/QGIS/QGIS3/profiles/default/python /home/riannek/.local/share/QGIS/QGIS3/profiles/default/python/plugins /usr/share/qgis/python/plugins /usr/lib/python310.zip /usr/lib/python3.10 /usr/lib/python3.10/lib-dynload /home/riannek/.local/lib/python3.10/site-packages /usr/local/lib/python3.10/dist-packages /usr/lib/python3/dist-packages /usr/lib/python3.10/dist-packages /home/riannek/.local/share/QGIS/QGIS3/profiles/default/python /home/riannek/.local/share/QGIS/QGIS3/profiles/default/python/plugins/shapetools/ext-libs /usr/lib/python3/dist-packages/IPython/extensions /media/riannek/minimax/karten/test

jorgealmerio commented 5 months ago

Thanks to all! jjimenezshaw solved the bug. I already pushed version 3.0.19 to repository.