gustavowillam / SmartMapPlugin

Plugin Qgis3.10.x para interpolação utilizando Krigagem Ordinária (OK), Machine Learning (ML) e Geração de Zonas de Manejo
https://github.com/gustavowillam/SmartMapPlugin
GNU General Public License v3.0
52 stars 13 forks source link

Python Value Error at the end of the Kriging #76

Closed Lupin76 closed 1 month ago

Lupin76 commented 4 months ago

Hi Gustavo

thank you very much for the fantastic plugin you developed. Recently I started experiencing this python issue every time I use the SmartMap. You can find in attach the shapefile I used for the kriging. I need the column VWC as Zvalue. I just want to do an ordinary cleaning with default values A raster map is produced but I find the error at the end

Thank you very much

ValueError: invalid literal for int() with base 10: 'rgb:0.84313725490196079' Traceback (most recent call last): File "/home/giacomo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Smart_Map/Smart_Map.py", line 3883, in pushButton_Krigagem_clicked Output_Layer_File_tiff = self.export_raster_to_qgis(Input_Table, Output_Layer_File_tiff, Output_Layer_Name, z_field) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/giacomo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Smart_Map/Smart_Map.py", line 8424, in export_raster_to_qgis self.define_raster_color_ramp(rlayer, Output_Layer_Name) File "/home/giacomo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Smart_Map/Smart_Map.py", line 8599, in define_raster_color_ramp c1 = [ int(element) for element in rp['color1'].split(',') ] #first color Ex: red ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/giacomo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Smart_Map/Smart_Map.py", line 8599, in c1 = [ int(element) for element in rp['color1'].split(',') ] #first color Ex: red ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: 'rgb:0.84313725490196079'

Versione Python: 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] Versione di QGIS: 3.36.3-Maidenhead Maidenhead, 2df9655469b

Percorso Python: /usr/share/qgis/python /home/giacomo/.local/share/QGIS/QGIS3/profiles/default/python /home/giacomo/.local/share/QGIS/QGIS3/profiles/default/python/plugins /usr/share/qgis/python/plugins /usr/lib/python311.zip /usr/lib/python3.11 /usr/lib/python3.11/lib-dynload /home/giacomo/.local/lib/python3.11/site-packages /usr/local/lib/python3.11/dist-packages /usr/lib/python3/dist-packages /usr/lib/python3.11/dist-packages /home/giacomo/.local/share/QGIS/QGIS3/profiles/default/python /home/giacomo/Dropbox/Progetti/IN_CORSO/MOMA/GIS

David-Loibl commented 3 months ago

Hi, same here. I've installed QGIS via Anaconda with the following versions: QGIS 3.36.3 Python 3.12.3

gustavowillam commented 1 month ago

A new version of Smart-Map is available for QGIS versions 3.28 and 3.34. Please install the new version to fix the error described above.