Opened 5 years ago

Last modified 4 years ago

#3811 new defect

grass.lib.gis.G_getenv returns bytes in Python 3

Reported by: pmav99 Owned by: grass-dev@…
Priority: normal Milestone: 7.8.3
Component: Python Version: svn-trunk
Keywords: Cc:
CPU: Unspecified Platform: All

Description

grass.lib.gis.G_getenv returns bytes in Python 3. Consequently code that expects the return value to be str is failing. E.g. https://grass.osgeo.org/grass77/manuals/libpython/_modules/pygrass/gis.html#Mapset.is_current (btw, there are no tests for is_current).

There are tests for G_getenv, but they are also failing: lib/gis/testsuite/gis_lib_env_test.py

Change History (5)

comment:1 by annakrat, 5 years ago

In 74383:

pygrass: use getenv from utils to decode bytes, see #3811

comment:2 by neteler, 5 years ago

Milestone: 7.8.07.8.1

Ticket retargeted after milestone closed

comment:3 by neteler, 4 years ago

Milestone: 7.8.17.8.2

Ticket retargeted after milestone closed

comment:4 by neteler, 4 years ago

Milestone: 7.8.2

Ticket retargeted after milestone closed

comment:5 by neteler, 4 years ago

Milestone: 7.8.3
Note: See TracTickets for help on using tickets.