Opened 8 years ago
Last modified 7 years ago
#3338 new defect
UnicodeDecodeError when registering maps in a STRDS using a translated version of GRASS
Reported by: | lrntct | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.2.4 |
Component: | Temporal | Version: | 7.2.0 |
Keywords: | translation UnicodeDecodeError | Cc: | |
CPU: | x86-64 | Platform: | Linux |
Description
Using a Spanish locale, the following error appears when trying to register maps in a STRDS using the python interface:
Registrando mapas en conjunto de datos espacio temporales... Actualizando conjunto de datos temporales... Traceback (most recent call last): File "Documentos/tarea_6_5_Roberta.py", line 131, in <module> sys.exit(main()) File "Documentos/tarea_6_5_Roberta.py", line 79, in main register_maps_in_strds(TITULO_STRDS, ID_STRDS, DESC_STRDS, list_nombre_fecha) File "Documentos/tarea_6_5_Roberta.py", line 98, in register_maps_in_strds tgis.register.register_map_object_list('raster', map_dts_lst, stds, delete_empty=True, unit=None) File "/usr/lib/grass72/etc/python/grass/temporal/register.py", line 499, in register_map_object_list file=filename, dbif=dbif) File "/usr/lib/grass72/etc/python/grass/temporal/register.py", line 341, in register_maps_in_space_time_dataset sp.update_from_registered_maps(dbif) File "/usr/lib/grass72/etc/python/grass/temporal/abstract_space_time_dataset.py", line 2282, in update_from_registered_maps " all registered maps of <%s>") % (self.get_id())) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 28: ordinal not in range(128)
Changing the system settings to English fix the issue.
Attachments (1)
Change History (6)
comment:1 by , 8 years ago
by , 7 years ago
Attachment: | python_temporal_fix.diff added |
---|
Remove gettext macros from debug messages
comment:2 by , 7 years ago
Attached a patch to remove undesired gettext macros from debug messages - a will guess: does it help?
comment:5 by , 7 years ago
Milestone: | → 7.2.4 |
---|
Note:
See TracTickets
for help on using tickets.
Below is a minimum working example. Try to run it with a Spanish locale, it will fail. In English, it will run OK.