[GRASS-dev] [GRASS GIS] #3723: winGRASS7.7.svn - core.py - python 3 issues

GRASS GIS trac at osgeo.org
Sat Jan 5 01:32:17 PST 2019


#3723: winGRASS7.7.svn - core.py - python 3 issues
--------------------------+------------------------------------
  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:5 martinl]:
 > Replying to [comment:2 hellik]:
 > > https://stackoverflow.com/questions/52269281/fix-import-error-on-
 using-environb-in-python#
 >
 > suggested modification applied in r73906 (for better testing). It will
 appear in winGRASS build no. 364+.

 tested with

 {{{
 Welcome to GRASS GIS 7.7.svn (r73906)
 }}}


 {{{
 C:\>g.gui wxpython
 Launching <wxpython> GUI in the background, please wait...

 C:\>Traceback (most recent call last):
   File "C:\OSGeo4W\apps\grass\grass-7.7.svn/gui/wxpython/wxgui.py", line
 27, in
 <module>
     from core import globalvar
   File
 "C:\OSGeo4W\apps\grass\grass-7.7.svn\gui\wxpython\core\globalvar.py", lin
 e 31, in <module>
     from core.debug import Debug
   File "C:\OSGeo4W\apps\grass\grass-7.7.svn\gui\wxpython\core\debug.py",
 line 77
 , in <module>
     Debug = DebugMsg()
   File "C:\OSGeo4W\apps\grass\grass-7.7.svn\gui\wxpython\core\debug.py",
 line 39
 , in __init__
     self.SetLevel()
   File "C:\OSGeo4W\apps\grass\grass-7.7.svn\gui\wxpython\core\debug.py",
 line 45
 , in SetLevel
     self.debuglevel = int(grass.gisenv().get('WX_DEBUG', 0))
   File
 "C:\OSGeo4W\apps\grass\grass-7.7.svn\etc\python\grass\script\core.py", li
 ne 1082, in gisenv
     s = read_command("g.gisenv", flags='n', env=env)
   File
 "C:\OSGeo4W\apps\grass\grass-7.7.svn\etc\python\grass\script\core.py", li
 ne 502, in read_command
     process = pipe_command(*args, **kwargs)
   File
 "C:\OSGeo4W\apps\grass\grass-7.7.svn\etc\python\grass\script\core.py", li
 ne 471, in pipe_command
     return start_command(*args, **kwargs)
   File
 "C:\OSGeo4W\apps\grass\grass-7.7.svn\etc\python\grass\script\core.py", li
 ne 396, in start_command
     if debug_level() > 0:
   File
 "C:\OSGeo4W\apps\grass\grass-7.7.svn\etc\python\grass\script\core.py", li
 ne 1670, in debug_level
     _debug_level = int(gisenv().get('DEBUG', 0))
   File
 "C:\OSGeo4W\apps\grass\grass-7.7.svn\etc\python\grass\script\core.py", li
 ne 1082, in gisenv
     s = read_command("g.gisenv", flags='n', env=env)
   File
 "C:\OSGeo4W\apps\grass\grass-7.7.svn\etc\python\grass\script\core.py", li
 ne 502, in read_command
     process = pipe_command(*args, **kwargs)
   File
 "C:\OSGeo4W\apps\grass\grass-7.7.svn\etc\python\grass\script\core.py", li
 ne 471, in pipe_command
     return start_command(*args, **kwargs)
   File
 "C:\OSGeo4W\apps\grass\grass-7.7.svn\etc\python\grass\script\core.py", li
 ne 401, in start_command
     return Popen(args, **popts)
   File
 "C:\OSGeo4W\apps\grass\grass-7.7.svn\etc\python\grass\script\core.py", li
 ne 66, in __init__
     cmd = shutil_which(args[0])
   File
 "C:\OSGeo4W\apps\grass\grass-7.7.svn\etc\python\grass\script\core.py", li
 ne 220, in shutil_which
     if any(cmd.lower().endswith(ext.lower()) for ext in pathext):
   File
 "C:\OSGeo4W\apps\grass\grass-7.7.svn\etc\python\grass\script\core.py", li
 ne 220, in <genexpr>
     if any(cmd.lower().endswith(ext.lower()) for ext in pathext):
 TypeError: endswith first arg must be bytes or a tuple of bytes, not str
 }}}

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



More information about the grass-dev mailing list