ValueError: invalid literal for int() with base 10:

114 views
Skip to first unread message

Clau Ludwig

unread,
Apr 18, 2024, 1:56:23 PM4/18/24
to qgisbrasil

Estou tentando fazer uma interpolação pro krigagem, e aparece o erro abaixo. Alguém pode me dizer qual o problema?

Um erro ocorreu enquanto executava o código Python:

ValueError: invalid literal for int() with base 10: 'rgb:0.84313725490196079' Traceback (most recent call last):
  File "C:\Users/Iapar/AppData/Roaming/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 "C:\Users/Iapar/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Smart_Map\Smart_Map.py", line 8528, in export_raster_to_qgis
    self.define_raster_color_ramp(rlayer, Output_Layer_Name)
  File "C:\Users/Iapar/AppData/Roaming/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 "C:\Users/Iapar/AppData/Roaming/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'


Versão do Python: 3.9.18 (heads/master:5eba59e, Feb  1 2024, 20:02:10) [MSC v.1929 64 bit (AMD64)]
Versão do QGIS: 3.36.0-Maidenhead Maidenhead, 09951dc0

Caminho do Python:
  • C:/PROGRA~1/QGIS33~1.0/apps/qgis/./python
  • C:/Users/Iapar/AppData/Roaming/QGIS/QGIS3\profiles\default/python
  • C:/Users/Iapar/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
  • C:/PROGRA~1/QGIS33~1.0/apps/qgis/./python/plugins
  • C:\PROGRA~1\QGIS33~1.0\apps\grass\grass83\etc\python
  • C:\Users\Iapar\Documents
  • C:\Program Files\QGIS 3.36.0\bin\python39.zip
  • C:\PROGRA~1\QGIS33~1.0\apps\Python39\DLLs
  • C:\PROGRA~1\QGIS33~1.0\apps\Python39\lib
  • C:\Program Files\QGIS 3.36.0\bin
  • C:\PROGRA~1\QGIS33~1.0\apps\Python39
  • C:\PROGRA~1\QGIS33~1.0\apps\Python39\lib\site-packages
  • C:\PROGRA~1\QGIS33~1.0\apps\Python39\lib\site-packages\win32
  • C:\PROGRA~1\QGIS33~1.0\apps\Python39\lib\site-packages\win32\lib
  • C:\PROGRA~1\QGIS33~1.0\apps\Python39\lib\site-packages\Pythonwin
  • C:/Users/Iapar/AppData/Roaming/QGIS/QGIS3\profiles\default/python
  • C:\Users\Iapar\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\HCMGIS/forms
  • C:\Users\Iapar\AppData\Roaming\QGIS\QGIS3\profiles\default\python\site-packages
  • C:/CLAU/MAPAS-Qgiz/Mapas/Desvios2024/Temp Min

------------------------------

Processamento QGiz

2024-04-18T14:35:39     INFO    Comando GDAL:

2024-04-18T14:35:39     INFO    gdalwarp -overwrite -s_srs EPSG:31982 -t_srs EPSG:31982 -of GTiff -cutline "C:/CLAU/MAPAS-Qgiz/Mapas/Desvios2024/Temp Min/CamadaEstadoUTM.shp" -cl CamadaEstadoUTM -crop_to_cutline -dstnodata -999999999.0 1_Krig_3_Grid_Map.tiff "C:/CLAU/MAPAS-Qgiz/Mapas/Desvios2024/Temp Min\\Smart-Map\\1_Krig_3_Grid_Map_1.tiff"

2024-04-18T14:35:39     INFO    Saída do comando GDAL:

2024-04-18T14:35:40     INFO    Processo concluído com sucesso

2024-04-18T14:35:40     INFO    Resultados: {'OUTPUT': 'C:/CLAU/MAPAS-Qgiz/Mapas/Desvios2024/Temp Min\\Smart-Map\\1_Krig_3_Grid_Map_1.tiff'}

2024-04-18T14:35:40     INFO    Creating output file that is 663P x 465L.
             Processing 1_Krig_3_Grid_Map.tiff [1/1] : 0...10...20...30...40...50...60...70...80...90...100 - done.

--------------------


2024-04-18T14:35:40     WARNING    Traceback (most recent call last):
              File "C:\Users/Iapar/AppData/Roaming/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 "C:\Users/Iapar/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Smart_Map\Smart_Map.py", line 8528, in export_raster_to_qgis
              self.define_raster_color_ramp(rlayer, Output_Layer_Name)
              File "C:\Users/Iapar/AppData/Roaming/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 "C:\Users/Iapar/AppData/Roaming/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'
             

Clau Ludwig

unread,
Apr 19, 2024, 2:45:29 PM4/19/24
to qgisbrasil
A krigagem aparece preta e sem dadosCaptura de tela 2024-04-19 151827.png

Clau Ludwig

unread,
Apr 19, 2024, 2:45:50 PM4/19/24
to qgisbrasil
Pessoal, alguém consegue me ajudar? Minhas camadas estão em UTM, assim como o projeto

Em quinta-feira, 18 de abril de 2024 às 14:56:23 UTC-3, Clau Ludwig escreveu:

yjmenezes

unread,
Apr 20, 2024, 8:07:13 AM4/20/24
to qgisbrasil
Nao sei se seria o caso, mas veja se o espaco no nome de diretorio esta gerando problema. "Temp Min".

Clau Ludwig

unread,
Apr 22, 2024, 12:41:16 PM4/22/24
to qgisbrasil
Agradeço pela atenção.

Havia notado isso e diminui o tamanho do caminho até a pasta. Além disso arrumei essa questão. E o erro continua sendo o mesmo. Infelizmente.

Esse erro não teria relação à cor? 




  • C:/CLAU/Qgiz/Mapas/Desvios2024/TMin

Clau Ludwig

unread,
Apr 22, 2024, 4:24:39 PM4/22/24
to qgisbrasil
Descobri o problema. era a versão do qgiz, precisei troca-la. Obrigada

Em sábado, 20 de abril de 2024 às 09:07:13 UTC-3, yjmenezes escreveu:
Reply all
Reply to author
Forward
0 new messages