[GRASS-dev] [GRASS GIS] #3392: t.register: encoding error
GRASS GIS
trac at osgeo.org
Sat Aug 12 07:59:19 PDT 2017
#3392: t.register: encoding error
--------------------------+---------------------------------
Reporter: mlennert | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.2.2
Component: Temporal | Version: svn-trunk
Resolution: | Keywords: t.register encoding
CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------
Comment (by mlennert):
Replying to [comment:10 huhabla]:
> Replying to [comment:9 mlennert]:
> > Maybe the solution needs to be found in lib/python/pygrass/messages ?
>
> Good point. I have tried to fix this issue and attached the
"pygrass_temporal_gis_utf_handling.diff" that must be applied to fresh
trunk.
> Can you please test the changes?
They don't seem to work:
{{{
t.create output=tempmean type=strds temporaltype=absolute title="Average
temperature" description="Monthly temperature average in NC [deg C]"
Process Process-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in
_bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/pygrass/messages/__init__.py", line 95, in
message_server
libgis.G_verbose_message(message.encode("utf-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2:
ordinal not in range(128)
}}}
and, even worse:
{{{
t.register -i input=tempmean type=raster start=2000-01-01 increment="1
months" file=rasters_tempmean.list
Collecte des informations sur la carte ...
Process Process-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in
_bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/pygrass/messages/__init__.py", line 93, in
message_server
libgis.G_debug(level, message.encode("utf-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1:
ordinal not in range(128)
ATTENTION: Needed to restart the messenger server
Process Process-3:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in
_bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/pygrass/messages/__init__.py", line 93, in
message_server
libgis.G_debug(level, message.encode("utf-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1:
ordinal not in range(128)
ATTENTION: Needed to restart the messenger server
Process Process-4:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in
_bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/pygrass/messages/__init__.py", line 93, in
message_server
libgis.G_debug(level, message.encode("utf-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1:
ordinal not in range(128)
ATTENTION: Needed to restart the messenger server
[...]
}}}
I'm also not sure whether using u' strings is the solution, nor how
portable this is between Python 2 and 3. Anna should probably have a look
at this as she has quite some experience with the encoding issues...
>I am not able to convince my GRASS installation to use the German locale
that i have set, so its a kind of dry test.
You can use the GUI: Settings->Preferences->Appearance->Language settings.
However: looking at grasslibs_de.po I have the feeling that most temporal
lib strings have not been translated to German, yet. Maybe these strings
have only recently been translated to French, making the errors appear now
?
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3392#comment:11>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list