[GRASS-dev] [GRASS GIS] #3837: OSGeo4W winGRASS77svn - startup error: TypeError: endswith first arg must be bytes or a tuple of bytes, not str
GRASS GIS
trac at osgeo.org
Sat May 11 13:24:32 PDT 2019
#3837: OSGeo4W winGRASS77svn - startup error: TypeError: endswith first arg must
be bytes or a tuple of bytes, not str
--------------------------+------------------------------------
Reporter: hellik | Owner: grass-dev@…
Type: defect | Status: new
Priority: blocker | Milestone: 7.8.0
Component: Python | Version: svn-trunk
Resolution: | Keywords: python3, py3, wingrass
CPU: Unspecified | Platform: MSWindows
--------------------------+------------------------------------
Comment (by hellik):
Replying to [comment:14 pmav99]:
> OK, it seems that this will be probably fixed on Python 3.8:
> - https://bugs.python.org/issue18283
> -
https://github.com/python/cpython/commit/5680f6546dcda550ad70eefa0a5ebf1375303307
>
> In the meantime, @hellik can you please try to copy paste the 3.8
version of shutil.which from github and test if it works?
> -
https://github.com/python/cpython/blob/d8320ecb86da8df7c13d8bf8582507f736aa2924/Lib/shutil.py#L1293-L1369
now what I've done:
* I copied ''def which'' and ''def _access_check'' (L1285-L1369) from
[https://github.com/python/cpython/commit/5680f6546dcda550ad70eefa0a5ebf1375303307
python github] into C:\OSGeo4W64\apps\Python37\lib\shutil.py
=> the wxGUI start up window to select a location/mapset pops up.
thus, the python fix for 3.8 (''shutil.which() should support bytes'')
seems to work.
then there is another issue (in
C:\OSGEO4~1\apps\Python37\lib\xml\etree\ElementTree.py), but then this may
be another ticket.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3837#comment:16>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list