Closed jehlijos closed 4 months ago
I have tested five random styles chosen from the combobox. When I choose inferno
and click on Run
, the plugin crashes with the following message:
An error has occurred while executing Python code:
ValueError: invalid literal for int() with base 10: 'perceptually'
Traceback (most recent call last):
File "/home/pesek/.local/share/QGIS/QGIS3/profiles/default/python/plugins/2024-b-grass-qgis-colors-convert/GRASS_GIS_Color_Table_Import_dockwidget.py", line 166, in Run
convert_color_table_grass_to_qgis(GRASStable, Tempfile)
File "/home/pesek/.local/share/QGIS/QGIS3/profiles/default/python/plugins/2024-b-grass-qgis-colors-convert/qgis_color_func.py", line 79, in convert_color_table_grass_to_qgis
rgb_values = tuple(map(int, parts[1:]))
ValueError: invalid literal for int() with base 10: 'perceptually'
Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
QGIS version: 3.34.4-Prizren Prizren, exported
As it does not happen for colour tables not including the character %
nor for those including integers and %
, I believe the problem is connected to floats together with the character %
in the colour table. Try for example grass
or wave
table and the same error message will occur.
Although the icon.png looks very nice (big thumbs up), it is not loaded. However, this might might also be just an issue at my side. Does it load for you?
Also, I would prefer the GUI of the GRASS table to have the following layout: label, combobox, pushbutton. In the combobox, there could be an empty spot that is filled with the path if you select a file.
Although the icon.png looks very nice (big thumbs up), it is not loaded. However, this might might also be just an issue at my side. Does it load for you?
I can confirm this issue. @jehlijos You need to update resource file. Install pb_tool
(via pip). Remove resources.py
file and run pb_tool compile
. Push these modifications to git. (BTW, nice icon :-)
@pesekon2 It seems to me that the screenshot is smoderpish ;-)
@jehlijos UI could be simplied a bit, suggestions:
1)
Remove duplicated label Select GRASS color table file:
just above the file widget.
2)
Two widgets (file widget for selecting directory and lineedit widget for selecting filename without extension) could be replace by single file widget for defining full file path to target QML file.
@jehlijos BTW, I tested srtm
color table (#11) which should work to my understanding(?) But it's separated issue and should be solved in a new PR. In this PR let's finish UI design and fix icon.
@jehlijos Any progress with this PR?
Tasks:
combobox with default GRASS tables and their icons added -- GRASScomboBox added - loads names of the tables and their icons -- nonDefaultFileSelectedFlag decides if path to selected table is from default folder or user defined -- Check box that enables custom file path selection added -- icon redesigned and added next to run button