Opened 6 years ago

Closed 6 years ago

#3733 closed defect (fixed)

winGRASS 7.7svn execute command fails

Reported by: martinl Owned by: grass-dev@…
Priority: normal Milestone: 7.8.0
Component: wxGUI Version: svn-trunk
Keywords: python3, wingrass Cc:
CPU: Unspecified Platform: Unspecified

Description

Executing random command in GUI fails with

Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\Python37\lib\threading.py", line
917, in _bootstrap_inner
    self.run()
  File "C:\OSGEO4~1\apps\grass\grass-7.7.svn\gui\wxpython\co
re\gconsole.py", line 163, in run
    self.resultQ.put((requestId, self.requestCmd.run()))
  File "C:\OSGEO4~1\apps\grass\grass-7.7.svn\gui\wxpython\co
re\gcmd.py", line 582, in run
    args[0] = grass.get_real_command(args[0])
  File "C:\OSGEO4~1\apps\grass\grass-7.7.svn\etc\python\gras
s\script\core.py", line 277, in get_real_command
    full_path = shutil_which(cmd + '.py')
  File "C:\OSGEO4~1\apps\grass\grass-7.7.svn\etc\python\gras
s\script\core.py", line 222, in shutil_which
    if any(cmd.lower().endswith(ext) for ext in pathext):
  File "C:\OSGEO4~1\apps\grass\grass-7.7.svn\etc\python\gras
s\script\core.py", line 222, in <genexpr>
    if any(cmd.lower().endswith(ext) for ext in pathext):
TypeError: endswith first arg must be str or a tuple of str,
not bytes

Change History (6)

comment:1 by martinl, 6 years ago

Component: DefaultwxGUI
Keywords: python3 wingrass added
Milestone: 7.8.0
Version: unspecifiedsvn-trunk

in reply to:  description ; comment:2 by hellik, 6 years ago

Replying to martinl:

Executing random command in GUI fails with

Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\Python37\lib\threading.py", line
917, in _bootstrap_inner
    self.run()
  File "C:\OSGEO4~1\apps\grass\grass-7.7.svn\gui\wxpython\co
re\gconsole.py", line 163, in run
    self.resultQ.put((requestId, self.requestCmd.run()))
  File "C:\OSGEO4~1\apps\grass\grass-7.7.svn\gui\wxpython\co
re\gcmd.py", line 582, in run
    args[0] = grass.get_real_command(args[0])
  File "C:\OSGEO4~1\apps\grass\grass-7.7.svn\etc\python\gras
s\script\core.py", line 277, in get_real_command
    full_path = shutil_which(cmd + '.py')
  File "C:\OSGEO4~1\apps\grass\grass-7.7.svn\etc\python\gras
s\script\core.py", line 222, in shutil_which
    if any(cmd.lower().endswith(ext) for ext in pathext):
  File "C:\OSGEO4~1\apps\grass\grass-7.7.svn\etc\python\gras
s\script\core.py", line 222, in <genexpr>
    if any(cmd.lower().endswith(ext) for ext in pathext):
TypeError: endswith first arg must be str or a tuple of str,
not bytes

Isn't it the same as already reported in an earlier Ticket?

in reply to:  2 comment:3 by martinl, 6 years ago

Replying to hellik:

Isn't it the same as already reported in an earlier Ticket?

yes, very similar. Will investigate more.

comment:4 by martinl, 6 years ago

In 74010:

winGRASS 7.7svn execute command fails, see #3733

in reply to:  4 comment:5 by hellik, 6 years ago

Replying to martinl:

In 74010:

winGRASS 7.7svn execute command fails, see #3733

tested with

System Info                                                                     
GRASS Version: 7.7.svn                                                          
GRASS SVN revision: r74011                                                      
Build date: 2019-01-25                                                          
Build platform: x86_64-w64-mingw32                                              
GDAL: 2.4.0                                                                     
PROJ.4: 5.2.0                                                                   
GEOS: 3.7.0                                                                     
SQLite: 3.26.0                                                                  
Python: 3.7.0                                                                   
wxPython: 4.0.3                                                                 
Platform: Windows-10-10.0.17763-SP0 (OSGeo4W)

modules (exe and python scripts) are working now. thanks for the fix.

closing ticket, feel free to reopen if needed.

comment:6 by hellik, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.