[GRASS-dev] [GRASS GIS] #3446: GRASS python library is not working with python 3
GRASS GIS
trac at osgeo.org
Thu Nov 16 09:16:44 PST 2017
#3446: GRASS python library is not working with python 3
-------------------------------------+-------------------------
Reporter: lrntct | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.4.0
Component: Python | Version: 7.2.1
Keywords: python python3 temporal | CPU: x86-64
Platform: Linux |
-------------------------------------+-------------------------
Various pygrass modules fail to import in Python 3.6.
Python version:
{{{
Python 3.6.3 (default, Oct 3 2017, 21:45:48)
[GCC 7.2.0] on linux
}}}
For example:
{{{
import grass.pygrass.gis
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/grass72/etc/python/grass/pygrass/gis/__init__.py", line
14, in <module>
libgis.G_gisinit('')
File "/usr/lib/grass72/etc/python/grass/lib/gis.py", line 3489, in
G_gisinit
return (G__gisinit (GIS_H_VERSION, pgm))
ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type
}}}
This issue prevents pygrass and the temporal framework to work with
python3:
{{{
>>> import grass.temporal as tgis
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/grass72/etc/python/grass/temporal/__init__.py", line 3,
in <module>
from .core import *
File "/usr/lib/grass72/etc/python/grass/temporal/core.py", line 45, in
<module>
from .c_libraries_interface import *
File
"/usr/lib/grass72/etc/python/grass/temporal/c_libraries_interface.py",
line 28, in <module>
from grass.pygrass.rpc.base import RPCServerBase
File "/usr/lib/grass72/etc/python/grass/pygrass/rpc/__init__.py", line
21, in <module>
from grass.pygrass.vector import *
File "/usr/lib/grass72/etc/python/grass/pygrass/vector/__init__.py",
line 6, in <module>
libgis.G_gisinit('')
File "/usr/lib/grass72/etc/python/grass/lib/gis.py", line 3489, in
G_gisinit
return (G__gisinit (GIS_H_VERSION, pgm))
ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type
}}}
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3446>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list