[GRASS-dev] [GRASS GIS] #3392: t.register: encoding error

GRASS GIS trac at osgeo.org
Sat Aug 19 09:01:43 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:19 annakrat]:
 > I applied that one line to trunk. It needs testing before we backport
 it. This works very likely only with Python 2, not Python 3. For that we
 need to do probably substantial changes, which I haven't looked at yet.
 >
 > I was previously running into more problems, but I can't reproduce it
 now. So please test.

 Just did and I don't understand why, but I again have issues (see below),
 but not the same as before. I'm a bit lost as to why it worked before, but
 not now....


 {{{
 export LANGUAGE=fr_BE;t.create output=tempmean type=strds
 temporaltype=absolute title="Average temperature" description="Monthly
 temperature average in NC [deg C]"
 Traceback (most recent call last):
   File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/scripts/t.create", line 86, in <module>
     main()
   File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/scripts/t.create", line 82, in main
     semantic, None, grass.overwrite())
   File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/temporal/open_stds.py", line 174, in open_new_stds
     sp.insert(dbif)
   File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/temporal/abstract_space_time_dataset.py", line 376,
 in insert
     self.get_id()))
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 75:
 ordinal not in range(128)
 }}}

 And if I go on with LANGUAGE=C to create the strds:


 {{{
 export LANGUAGE=C;t.create output=tempmean type=strds
 temporaltype=absolute title="Average temperature" description="Monthly
 temperature average in NC [deg C]"
 g.list type=raster pattern="*tempmean" > rasters_tempmean.list
 export LANGUAGE=fr_BE;t.register -i input=tempmean type=raster
 start=2000-01-01 increment="1 months" file=rasters_tempmean.list
 Collecte des informations sur la carte ...
 ERREUR :ascii,Définir un temps absolu valide pour la carte <,1,2,ordinal
         not in range(128)
 }}}

 and then


 {{{
 export LANGUAGE=C;t.register -i input=tempmean type=raster
 start=2000-01-01 increment="1 months" file=rasters_tempmean.list
 Gathering map information...
  100%
 Registering maps in the temporal database...
 Registering maps in the space time dataset...
 Updating space time dataset...
  100%
 }}}

 and then


 {{{
 export LANGUAGE=fr_BE;t.remove tempmean
 Note: registered maps themselves have not been removed, only the strds
 }}}

 but

 {{{
 export LANGUAGE=fr_BE;t.unregister file=rasters_tempmean.list
 Unregister maps
 Traceback (most recent call last):
   File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/scripts/t.unregister", line 183, in <module>
     tgis.profile_function(main)
   File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/temporal/core.py", line 84, in profile_function
     func()
   File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/scripts/t.unregister", line 142, in main
     statement += map.delete(dbif=dbif, update=False, execute=False)
   File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/temporal/abstract_map_dataset.py", line 860, in
 delete
     "database") % (self.get_type(), self.get_id()))
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 24:
 ordinal not in range(128)
 }}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3392#comment:21>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list