[GRASS-dev] [GRASS GIS] #3733: winGRASS 7.7svn execute command fails

#3733: winGRASS 7.7svn execute command fails
-------------------------+-------------------------
Reporter: martinl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone:
Component: Default | Version: unspecified
Keywords: | CPU: Unspecified
Platform: Unspecified |
-------------------------+-------------------------
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
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3733&gt;
GRASS GIS <https://grass.osgeo.org>

#3733: winGRASS 7.7svn execute command fails
--------------------------+-------------------------------
  Reporter: martinl | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: python3, wingrass
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------------
Changes (by martinl):

* keywords: => python3, wingrass
* version: unspecified => svn-trunk
* component: Default => wxGUI
* milestone: => 7.8.0

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3733#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3733: winGRASS 7.7svn execute command fails
--------------------------+-------------------------------
  Reporter: martinl | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: python3, wingrass
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------------

Comment (by hellik):

Replying to [ticket:3733 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?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3733#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3733: winGRASS 7.7svn execute command fails
--------------------------+-------------------------------
  Reporter: martinl | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: python3, wingrass
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------------

Comment (by martinl):

Replying to [comment:2 hellik]:
> Isn't it the same as already reported in an earlier Ticket?

yes, very similar. Will investigate more.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3733#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#3733: winGRASS 7.7svn execute command fails
--------------------------+-------------------------------
  Reporter: martinl | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: python3, wingrass
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------------

Comment (by martinl):

In [changeset:"74010" 74010]:
{{{
#!CommitTicketReference repository="" revision="74010"
winGRASS 7.7svn execute command fails, see #3733
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3733#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>

#3733: winGRASS 7.7svn execute command fails
--------------------------+-------------------------------
  Reporter: martinl | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: python3, wingrass
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------------

Comment (by hellik):

Replying to [comment:4 martinl]:
> In [changeset:"74010" 74010]:
> {{{
> #!CommitTicketReference repository="" revision="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.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3733#comment:5&gt;
GRASS GIS <https://grass.osgeo.org>

#3733: winGRASS 7.7svn execute command fails
--------------------------+-------------------------------
  Reporter: martinl | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.8.0
Component: wxGUI | Version: svn-trunk
Resolution: fixed | Keywords: python3, wingrass
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------------
Changes (by hellik):

* status: new => closed
* resolution: => fixed

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3733#comment:6&gt;
GRASS GIS <https://grass.osgeo.org>