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

GRASS GIS trac at osgeo.org
Mon Aug 14 06:28:29 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:14 mlennert]:
 >
 > Just the line
 >
 >
 > {{{
 > self.connection.text_factory = str
 > }}}
 >
 > already suffices to solve the above-mentioned issues

 But it only works with Python2. With Python3, I get:


 {{{
 python --version
 Python 3.5.4rc1

 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 "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/scripts/t.create", line 86, in <module>
     main()
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/scripts/t.create", line 68, in main
     import grass.temporal as tgis
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/temporal/__init__.py", line 3, in <module>
     from .core import *
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/temporal/core.py", line 44, in <module>
     from .c_libraries_interface import *
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/temporal/c_libraries_interface.py", line 27, in
 <module>
     from grass.pygrass.rpc.base import RPCServerBase
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/pygrass/rpc/__init__.py", line 21, in <module>
     from grass.pygrass.vector import *
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/pygrass/vector/__init__.py", line 6, in <module>
     libgis.G_gisinit('')
   File "/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/gis.py", line 3553, in G_gisinit
     return (G__gisinit (GIS_H_VERSION, pgm))
 ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type
 }}}

 But then again, the same happens without Anna's patch, so this is a
 different issue.

 That's probably a point to keep in mind for a future code sprint:
 systematically test with python 3 and debug the issues...

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



More information about the grass-dev mailing list