[GRASS-dev] [GRASS GIS] #3662: pygrass open vector fails in python3
GRASS GIS
trac at osgeo.org
Wed Sep 26 06:52:45 PDT 2018
#3662: pygrass open vector fails in python3
-------------------------+-------------------------
Reporter: martinl | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.8.0
Component: PyGRASS | Version: unspecified
Keywords: python3 | CPU: Unspecified
Platform: Unspecified |
-------------------------+-------------------------
Opening vector map using PyGRASS fails in Python3:
{{{
>>> from grass.pygrass.vector import Vector
>>> s = Vector('streams')
>>> s.open('r')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/src/grass7_trunk_py3/dist.x86_64-pc-linux-
gnu/etc/python/grass/pygrass/vector/abstract.py", line 380, in open
self.table = self.dblinks.by_layer(layer).table()
File "/opt/src/grass7_trunk_py3/dist.x86_64-pc-linux-
gnu/etc/python/grass/pygrass/vector/table.py", line 801, in table
return Table(self.table_name, self.connection(), self.key)
File "/opt/src/grass7_trunk_py3/dist.x86_64-pc-linux-
gnu/etc/python/grass/pygrass/vector/table.py", line 764, in connection
dbpath = get_path(self.database, self.table_name)
File "/opt/src/grass7_trunk_py3/dist.x86_64-pc-linux-
gnu/etc/python/grass/pygrass/vector/table.py", line 67, in get_path
if "$" not in path:
File "/opt/src/grass7_trunk_py3/dist.x86_64-pc-linux-
gnu/etc/python/grass/lib/ctypes_preamble.py", line 78, in __contains__
return char in self.data
TypeError: a bytes-like object is required, not 'str'
}}}
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3662>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list