[GRASS-dev] [GRASS GIS] #3720: temporal modules fail with python 3

#3720: temporal modules fail with python 3
-------------------------------+-------------------------
Reporter: veroandreo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 7.8.0
Component: Temporal | Version: svn-trunk
Keywords: temporal, python3 | CPU: x86-64
Platform: Linux |
-------------------------------+-------------------------
Temporal modules do not work with python3 in virtualenv. In a mapset where
I have strds, I run `t.list` and I get:

{{{
Process Process-2:
Traceback (most recent call last):
   File "/usr/lib64/python3.6/multiprocessing/process.py", line 258, in
_bootstrap
     self.run()
   File "/usr/lib64/python3.6/multiprocessing/process.py", line 93, in run
     self._target(*self._args, **self._kwargs)
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/temporal/c_libraries_interface.py", line 959, in
c_library_server
     functions[data[0]](lock, conn, data)
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/temporal/c_libraries_interface.py", line 241, in
_get_driver_name
     drstring = libtgis.tgis_get_mapset_driver_name(mapset)
ctypes.ArgumentError: argument 1: <class 'TypeError'>: expected LP_c_char
instance, got bytes
WARNING:root:Needed to restart the libgis server, caller: Server check
thread
Traceback (most recent call last):
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/pygrass/rpc/base.py", line 161, in safe_receive
     ret = self.client_conn.recv()
   File "/usr/lib64/python3.6/multiprocessing/connection.py", line 250, in
recv
     buf = self._recv_bytes()
   File "/usr/lib64/python3.6/multiprocessing/connection.py", line 407, in
_recv_bytes
     buf = self._recv(4)
   File "/usr/lib64/python3.6/multiprocessing/connection.py", line 383, in
_recv
     raise EOFError
EOFError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
gnu/scripts/t.list", line 186, in <module>
     main()
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
gnu/scripts/t.list", line 112, in main
     tgis.init()
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/temporal/core.py", line 571, in init
     driver_string = ciface.get_driver_name()
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/temporal/c_libraries_interface.py", line 1487, in
get_driver_name
     return self.safe_receive("get_driver_name")
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/pygrass/rpc/base.py", line 168, in safe_receive
     raise FatalError("Exception raised: " + str(e) + " Message: " +
message)
grass.exceptions.FatalError: Exception raised: Message: get_driver_name
WARNING:root:Needed to restart the libgis server, caller: Server check
thread
}}}

Same if I try to create a stds with `t.create`, ask info with `t.info` and
so on...

All temporal functionality is up and running in 76 release branch though.

See also #3682

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3720&gt;
GRASS GIS <https://grass.osgeo.org>

#3720: temporal modules fail with python 3
-------------------------+-------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: critical | Milestone: 7.8.0
Component: Temporal | Version: svn-trunk
Resolution: | Keywords: temporal, python3
       CPU: x86-64 | Platform: Linux
-------------------------+-------------------------------

Comment (by annakrat):

Please try again after recent changes.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3720#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3720: temporal modules fail with python 3
-------------------------+-------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: critical | Milestone: 7.8.0
Component: Temporal | Version: svn-trunk
Resolution: | Keywords: temporal, python3
       CPU: x86-64 | Platform: Linux
-------------------------+-------------------------------

Comment (by veroandreo):

I just tried, it is working as expected right now, also the algebra
(#3682).

However, I still get the following warning after each run of any temporal
module: `WARNING:root:Needed to restart the libgis server, caller: Server
check thread`. What does that mean?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3720#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3720: temporal modules fail with python 3
-------------------------+-------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: critical | Milestone: 7.8.0
Component: Temporal | Version: svn-trunk
Resolution: | Keywords: temporal, python3
       CPU: x86-64 | Platform: Linux
-------------------------+-------------------------------

Comment (by annakrat):

Replying to [comment:2 veroandreo]:
> I just tried, it is working as expected right now, also the algebra
(#3682).
>
> However, I still get the following warning after each run of any
temporal module: `WARNING:root:Needed to restart the libgis server,
caller: Server check thread`. What does that mean?

I looked at it briefly, but no idea. Perhaps close this ticket and create
a new one for this.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3720#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#3720: temporal modules fail with python 3
-------------------------+-------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: critical | Milestone: 7.8.0
Component: Temporal | Version: svn-trunk
Resolution: fixed | Keywords: temporal, python3
       CPU: x86-64 | Platform: Linux
-------------------------+-------------------------------
Changes (by veroandreo):

* status: new => closed
* resolution: => fixed

Comment:

Closing since functionality seems to be restored. I will open a new ticket
for the warning message described above. Thanks Anna :slight_smile:

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3720#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>