[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 12:10:19 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]:
 > 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

 will try a copy/paste; into core.py, right?

 what is missing in the 3.8 github version of shutil.which, is:

 {{{
 203             if b'.py' not in pathext:
 204                 # we assume that PATHEXT contains always '.py'
 205                 pathext.insert(0, b'.py')
 }}}

 this should be added to while copy/paste

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3837#comment:15>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list