[GRASS-dev] [GRASS-SVN] r60679 - grass/trunk/lib/python/script

Martin Landa wrote:

beside remaining compilation errors [1], wingrass 71 still (after
weeks!!!) even doesn't start...

Does anyone want to test the attached patch?

In particular, it needs to be tested with a Python script invoking an
exe with arguments containing characters which are likely to be
meaningful to the shell, including:

  " | < > % ^

d.text or r.support may be useful as test cases.

But in the longer term, should we be claiming to support a platform
for which we appear to have no active developers?

--
Glynn Clements <glynn@gclements.plus.com>

(attachments)

popen-win.diff (1.04 KB)

2014-07-02 1:10 GMT+02:00 Glynn Clements <glynn@gclements.plus.com>:

Does anyone want to test the attached patch?

I have locally applied the patch on the build server, result is
`r61114M-1010` [1], GRASS starts (welcome screen), unfortunately wxGUI
fails with

  File "C:\OSGEO4~1\apps\grass\grass-7.1.svn\gui\wxpython\wxgui.py", line 138,
n <module>
    sys.exit(main())
  File "C:\OSGEO4~1\apps\grass\grass-7.1.svn\gui\wxpython\wxgui.py", line 131,
n main
    app = GMApp(workspaceFile)
  File "C:\OSGEO4~1\apps\grass\grass-7.1.svn\gui\wxpython\wxgui.py", line 45, i
__init__
    wx.App.__init__(self, False)
  File "C:\OSGEO4~1\apps\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core
py", line 7981, in __init__
    self._BootstrapApp()
  File "C:\OSGEO4~1\apps\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core
py", line 7555, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "C:\OSGEO4~1\apps\grass\grass-7.1.svn\gui\wxpython\wxgui.py", line 79, i
OnInit
    workspace = self.workspaceFile)
  File "C:\OSGEO4~1\apps\grass\grass-7.1.svn\gui\wxpython\lmgr\frame.py", line
19, in __init__
    self._menuTreeBuilder = LayerManagerMenuData()
  File "C:\OSGEO4~1\apps\grass\grass-7.1.svn\gui\wxpython\lmgr\menudata.py", li
e 40, in __init__
    MenuTreeModelBuilder.__init__(self, filename, expandAddons=expandAddons)
  File "C:\OSGEO4~1\apps\grass\grass-7.1.svn\gui\wxpython\core\menutree.py", li
e 64, in __init__
    xmlTree = etree.parse(filename)
  File "C:\OSGEO4~1\apps\Python27\lib\xml\etree\ElementTree.py", line 1182, in
arse
    tree.parse(source, parser)
  File "C:\OSGEO4~1\apps\Python27\lib\xml\etree\ElementTree.py", line 657, in p
rse
    self._root = parser.close()
  File "C:\OSGEO4~1\apps\Python27\lib\xml\etree\ElementTree.py", line 1654, in
lose
    self._raiseerror(v)
  File "C:\OSGEO4~1\apps\Python27\lib\xml\etree\ElementTree.py", line 1506, in
raiseerror
    raise err
xml.etree.ElementTree.ParseError: no element found: line 1, column 0

The reason is empty XML wxGUI menu file (menudata.xml) produced by
building system, see [2].

Traceback (most recent call last):
  File "core/toolboxes.py", line 759, in <module>
    sys.exit(main())
  File "core/toolboxes.py", line 745, in main
    userDefined=False)
  File "core/toolboxes.py", line 204, in createTree
    moduleItems=moduleItems)
  File "core/toolboxes.py", line 241, in toolboxes2menudata
    _expandRuntimeModules(root)
  File "core/toolboxes.py", line 514, in _expandRuntimeModules
    desc, keywords = _loadMetadata(name)
  File "core/toolboxes.py", line 540, in _loadMetadata
    task = gtask.parse_interface(module)
  File "c:\osgeo4w\usr\src\grass_trunk\dist.i686-pc-mingw32\etc\python\grass\script\task.py",
line 501, in parse_interface
    tree = etree.fromstring(get_interface_description(name))
  File "c:\osgeo4w\usr\src\grass_trunk\dist.i686-pc-mingw32\etc\python\grass\script\task.py",
line 465, in get_interface_description
    stderr = PIPE)
  File "c:\osgeo4w\usr\src\grass_trunk\dist.i686-pc-mingw32\etc\python\grass\script\core.py",
line 58, in __init__
    name, ext = os.path.splitext(cmd)
  File "c:/OSGeo4W/apps/Python27\lib\ntpath.py", line 190, in splitext
    return genericpath._splitext(p, sep, altsep, extsep)
  File "c:/OSGeo4W/apps/Python27\lib\genericpath.py", line 91, in _splitext
    sepIndex = p.rfind(sep)
AttributeError: 'NoneType' object has no attribute 'rfind'
make[4]: *** [xml/menudata.xml] Error 1

Martin

[1] http://wingrass.fsv.cvut.cz/grass71/
[2] http://wingrass.fsv.cvut.cz/grass71/logs/log-r61114-1010/package.log

--
Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa

On Wed, Jul 2, 2014 at 10:39 AM, Martin Landa <landa.martin@gmail.com>
wrote:

The reason is empty XML wxGUI menu file (menudata.xml) produced by
building system, see [2].

Traceback (most recent call last):
  File "core/toolboxes.py", line 759, in <module>
    sys.exit(main())
  File "core/toolboxes.py", line 745, in main
    userDefined=False)
  File "core/toolboxes.py", line 204, in createTree
    moduleItems=moduleItems)
  File "core/toolboxes.py", line 241, in toolboxes2menudata
    _expandRuntimeModules(root)
  File "core/toolboxes.py", line 514, in _expandRuntimeModules
    desc, keywords = _loadMetadata(name)
  File "core/toolboxes.py", line 540, in _loadMetadata
    task = gtask.parse_interface(module)
  File
"c:\osgeo4w\usr\src\grass_trunk\dist.i686-pc-mingw32\etc\python\grass\script\task.py",
line 501, in parse_interface
    tree = etree.fromstring(get_interface_description(name))
  File
"c:\osgeo4w\usr\src\grass_trunk\dist.i686-pc-mingw32\etc\python\grass\script\task.py",
line 465, in get_interface_description
    stderr = PIPE)
  File
"c:\osgeo4w\usr\src\grass_trunk\dist.i686-pc-mingw32\etc\python\grass\script\core.py",
line 58, in __init__
    name, ext = os.path.splitext(cmd)
  File "c:/OSGeo4W/apps/Python27\lib\ntpath.py", line 190, in splitext
    return genericpath._splitext(p, sep, altsep, extsep)
  File "c:/OSGeo4W/apps/Python27\lib\genericpath.py", line 91, in _splitext
    sepIndex = p.rfind(sep)
AttributeError: 'NoneType' object has no attribute 'rfind'
make[4]: *** [xml/menudata.xml] Error 1

It seems that shutil_which returned None at line (from the patch):

cmd = shutil_which(args[0])

On Wed, Jul 2, 2014 at 10:59 AM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

On Wed, Jul 2, 2014 at 10:39 AM, Martin Landa <landa.martin@gmail.com>
wrote:

The reason is empty XML wxGUI menu file (menudata.xml) produced by
building system, see [2].

Traceback (most recent call last):
  File "core/toolboxes.py", line 759, in <module>
    sys.exit(main())
  File "core/toolboxes.py", line 745, in main
    userDefined=False)
  File "core/toolboxes.py", line 204, in createTree
    moduleItems=moduleItems)
  File "core/toolboxes.py", line 241, in toolboxes2menudata
    _expandRuntimeModules(root)
  File "core/toolboxes.py", line 514, in _expandRuntimeModules
    desc, keywords = _loadMetadata(name)
  File "core/toolboxes.py", line 540, in _loadMetadata
    task = gtask.parse_interface(module)
  File
"c:\osgeo4w\usr\src\grass_trunk\dist.i686-pc-mingw32\etc\python\grass\script\task.py",
line 501, in parse_interface
    tree = etree.fromstring(get_interface_description(name))
  File
"c:\osgeo4w\usr\src\grass_trunk\dist.i686-pc-mingw32\etc\python\grass\script\task.py",
line 465, in get_interface_description
    stderr = PIPE)
  File
"c:\osgeo4w\usr\src\grass_trunk\dist.i686-pc-mingw32\etc\python\grass\script\core.py",
line 58, in __init__
    name, ext = os.path.splitext(cmd)
  File "c:/OSGeo4W/apps/Python27\lib\ntpath.py", line 190, in splitext
    return genericpath._splitext(p, sep, altsep, extsep)
  File "c:/OSGeo4W/apps/Python27\lib\genericpath.py", line 91, in
_splitext
    sepIndex = p.rfind(sep)
AttributeError: 'NoneType' object has no attribute 'rfind'
make[4]: *** [xml/menudata.xml] Error 1

It's because it can't find v.in.gps. I suggest to add to the patch

something like this:

+ def __init__(self, args, **kwargs):
+ if ( sys.platform == 'win32'
+ and isinstance(args, list)
+ and not kwargs.get('shell', False)
+ and kwargs.get('executable') is None ):
+ cmd = shutil_which(args[0])
              if cmd is None:
                  raise OSError
+ args = [cmd] + args[1:]
+ name, ext = os.path.splitext(cmd)
+ if ext.lower() not in self._builtin_exts:
+ kwargs['shell'] = True
+ args = [self._escape_for_shell(arg) for arg in args]
+ subprocess.Popen.__init__(self, args, **kwargs)

It seems that shutil_which returned None at line (from the patch):

cmd = shutil_which(args[0])

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

On Wed, Jul 2, 2014 at 11:19 AM, Anna Petrášová <kratochanna@gmail.com>
wrote:

On Wed, Jul 2, 2014 at 10:59 AM, Vaclav Petras <wenzeslaus@gmail.com>
wrote:

On Wed, Jul 2, 2014 at 10:39 AM, Martin Landa <landa.martin@gmail.com>
wrote:

The reason is empty XML wxGUI menu file (menudata.xml) produced by
building system, see [2].

Traceback (most recent call last):
  File "core/toolboxes.py", line 759, in <module>
    sys.exit(main())
  File "core/toolboxes.py", line 745, in main
    userDefined=False)
  File "core/toolboxes.py", line 204, in createTree
    moduleItems=moduleItems)
  File "core/toolboxes.py", line 241, in toolboxes2menudata
    _expandRuntimeModules(root)
  File "core/toolboxes.py", line 514, in _expandRuntimeModules
    desc, keywords = _loadMetadata(name)
  File "core/toolboxes.py", line 540, in _loadMetadata
    task = gtask.parse_interface(module)
  File
"c:\osgeo4w\usr\src\grass_trunk\dist.i686-pc-mingw32\etc\python\grass\script\task.py",
line 501, in parse_interface
    tree = etree.fromstring(get_interface_description(name))
  File
"c:\osgeo4w\usr\src\grass_trunk\dist.i686-pc-mingw32\etc\python\grass\script\task.py",
line 465, in get_interface_description
    stderr = PIPE)
  File
"c:\osgeo4w\usr\src\grass_trunk\dist.i686-pc-mingw32\etc\python\grass\script\core.py",
line 58, in __init__
    name, ext = os.path.splitext(cmd)
  File "c:/OSGeo4W/apps/Python27\lib\ntpath.py", line 190, in splitext
    return genericpath._splitext(p, sep, altsep, extsep)
  File "c:/OSGeo4W/apps/Python27\lib\genericpath.py", line 91, in
_splitext
    sepIndex = p.rfind(sep)
AttributeError: 'NoneType' object has no attribute 'rfind'
make[4]: *** [xml/menudata.xml] Error 1

It's because it can't find v.in.gps. I suggest to add to the patch

something like this:

+ def __init__(self, args, **kwargs):
+ if ( sys.platform == 'win32'
+ and isinstance(args, list)
+ and not kwargs.get('shell', False)
+ and kwargs.get('executable') is None ):
+ cmd = shutil_which(args[0])
              if cmd is None:
                  raise OSError
+ args = [cmd] + args[1:]
+ name, ext = os.path.splitext(cmd)
+ if ext.lower() not in self._builtin_exts:
+ kwargs['shell'] = True
+ args = [self._escape_for_shell(arg) for arg in args]
+ subprocess.Popen.__init__(self, args, **kwargs)

Otherwise the patch seems to work, I can run:
grass.run_command('r.support', map='mymap', title="|@#~$%^&*()><") in GUI
python console which was not possible before. r.info then gives correct
result.

Running this command in gui console works but r.info gives incorrect result:
r.support map=scanned title="|@#$%^&*()"
and r.info gives ^^^|@#$%^^^^^^^&*()

but gui command line functionality was not affected by this patch, it uses
different popen class, this is related to r60634 and following.

It seems that shutil_which returned None at line (from the patch):

cmd = shutil_which(args[0])

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Hi,

2014-07-02 17:19 GMT+02:00 Anna Petrášová <kratochanna@gmail.com>:

It's because it can't find v.in.gps. I suggest to add to the patch something like this:

thanks, I included modified patch to the next build n1011. Martin

Anna Petrášová wrote:

> It's because it can't find v.in.gps. I suggest to add to the patch
something like this:

+ def __init__(self, args, **kwargs):
+ if ( sys.platform == 'win32'
+ and isinstance(args, list)
+ and not kwargs.get('shell', False)
+ and kwargs.get('executable') is None ):
+ cmd = shutil_which(args[0])
              if cmd is None:
                  raise OSError
+ args = [cmd] + args[1:]
+ name, ext = os.path.splitext(cmd)
+ if ext.lower() not in self._builtin_exts:
+ kwargs['shell'] = True
+ args = [self._escape_for_shell(arg) for arg in args]
+ subprocess.Popen.__init__(self, args, **kwargs)

Hmm; maybe:

    def __init__(self, args, **kwargs):
        if ( sys.platform == 'win32'
             and isinstance(args, list)
             and not kwargs.get('shell', False)
             and kwargs.get('executable') is None ):
            cmd = shutil_which(args[0])
            if cmd is not None:
                args = [cmd] + args[1:]
                name, ext = os.path.splitext(cmd)
                if ext.lower() not in self._builtin_exts:
                    kwargs['shell'] = True
                    args = [self._escape_for_shell(arg) for arg in args]
        subprocess.Popen.__init__(self, args, **kwargs)

If shutil_which() doesn't find the command, we just leave it to
Popen() to complain about it. It's conceivable that it might even
manage to run it (I wouldn't assume that shutil_which() mimics
Windows' own handling exactly).

Ideally, I'd prefer our version of Popen to be as close to the
original as we can get away with.

Alternatively.

    def __init__(self, args, **kwargs):
        if ( sys.platform == 'win32'
             and isinstance(args, list)
             and not kwargs.get('shell', False)
             and kwargs.get('executable') is None ):
            cmd = shutil_which(args[0])
            if cmd is not None:
                args = [cmd] + args[1:]
                name, ext = os.path.splitext(cmd)
            else:
    name, ext = None, ''
            if ext.lower() not in self._builtin_exts:
                kwargs['shell'] = True
                args = [self._escape_for_shell(arg) for arg in args]
        subprocess.Popen.__init__(self, args, **kwargs)

In this case, it falls back to using the shell if shutil_which()
fails, while still keeping the shell out of the way for an EXE.

--
Glynn Clements <glynn@gclements.plus.com>

Anna Petrášová wrote:

Running this command in gui console works but r.info gives incorrect result:
r.support map=scanned title="|@#$%^&*()"
and r.info gives ^^^|@#$%^^^^^^^&*()

That implies that the GUI is escaping for the shell but then either
not using the shell or overdoing the escaping.

But I'm less concerned about the GUI than about the core grass.script
functionality.

--
Glynn Clements <glynn@gclements.plus.com>

On Wed, Jul 2, 2014 at 7:35 PM, Glynn Clements <glynn@gclements.plus.com>
wrote:

kwargs['shell'] = True
args = [self._escape_for_shell(arg) for arg in args]

Considering security issues connected to shell=True* and uncertainty of
escaping for MS Windows**, wouldn't be better to avoid shell=True and try
to use the right interpreter? This can work at least for the most common
(and probably only important) case which is Python.

Vaclav

* Now thinking about various WPS servers using GRASS, GIS systems using
GRASS, and potential WebGRASS.
** It seems that it will be hard to guess how to do it.

Hi,

2014-07-02 20:54 GMT+02:00 Martin Landa <landa.martin@gmail.com>:

It's because it can't find v.in.gps. I suggest to add to the patch something like this:

thanks, I included modified patch to the next build n1011. Martin

seems to be set forward, committed as r61135, feel free to improve. Martin

--
Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa

Vaclav Petras wrote:

> kwargs['shell'] = True
> args = [self._escape_for_shell(arg) for arg in args]

Considering security issues connected to shell=True* and uncertainty of
escaping for MS Windows**, wouldn't be better to avoid shell=True and try
to use the right interpreter? This can work at least for the most common
(and probably only important) case which is Python.

That's an option. Although if we use .bat files to execute Python
scripts, shutil_which() will find the .bat file rather than the script
itself.

If we hard-code the handling of Python scripts, it should only be done
for those which are part of GRASS (i.e. where the script is located in
a subdirectory of $GISBASE).

We would still need to fall back to using the shell for other
extensions.

--
Glynn Clements <glynn@gclements.plus.com>

Martin Landa wrote

Hi,

2014-07-02 20:54 GMT+02:00 Martin Landa &lt;

landa.martin@

&gt;:

It's because it can't find v.in.gps. I suggest to add to the patch
something like this:

thanks, I included modified patch to the next build n1011. Martin

seems to be set forward, committed as r61135, feel free to improve. Martin

tested with:

GRASS 7.1.svn> g.version -g
version=7.1.svn
date=2014
revision=61158
build_date=2014-07-06
build_platform=i686-pc-mingw32

it fails with:

Launching <wxpython> GUI in the background, please wait...
GRASS 7.1.svn> Traceback (most recent call last):
  File "C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\wxgui.py", line
138, in
<module>
    sys.exit(main())
  File "C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\wxgui.py", line
131, in
main
    app = GMApp(workspaceFile)
  File "C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\wxgui.py", line 45,
in
__init__
    wx.App.__init__(self, False)
  File
"C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.p
y", line 7981, in __init__
    self._BootstrapApp()
  File
"C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.p
y", line 7555, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\wxgui.py", line 79,
in
OnInit
    workspace = self.workspaceFile)
  File "C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\lmgr\frame.py",
line 12
1, in __init__
    self._moduleTreeBuilder = LayerManagerModuleTree()
  File "C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\lmgr\menudata.py",
line
62, in __init__
    MenuTreeModelBuilder.__init__(self, filename, expandAddons=expandAddons)
  File "C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\core\menutree.py",
line
66, in __init__
    expAddons(xmlTree)
  File "C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\core\toolboxes.py",
lin
e 271, in expandAddons
    _expandAddonsItem(root)
  File "C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\core\toolboxes.py",
lin
e 431, in _expandAddonsItem
    addons = _getAddons()
  File "C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\core\toolboxes.py",
lin
e 404, in _getAddons
    flags='a').splitlines())
  File "C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\core\gcmd.py", line
704
, in RunCommand
    ps = grass.start_command(GetRealCmd(prog), flags, overwrite, quiet,
verbose,
**kwargs)
  File
"C:\OSGeo4W\apps\grass\grass-7.1.svn\etc\python\grass\script\core.py", li
ne 354, in start_command
    return Popen(args, **popts)
  File
"C:\OSGeo4W\apps\grass\grass-7.1.svn\etc\python\grass\script\core.py", li
ne 58, in __init__
    raise OSError
OSError

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Re-GRASS-SVN-r60679-grass-trunk-lib-python-script-tp5143645p5149811.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

On Sun, Jul 6, 2014 at 3:59 AM, Helmut Kudrnovsky <hellik@web.de> wrote:

Martin Landa wrote
> Hi,
>
> 2014-07-02 20:54 GMT+02:00 Martin Landa &lt;

> landa.martin@

> &gt;:
>>> It's because it can't find v.in.gps. I suggest to add to the patch
>>> something like this:
>>
>> thanks, I included modified patch to the next build n1011. Martin
>
> seems to be set forward, committed as r61135, feel free to improve.
Martin

tested with:

GRASS 7.1.svn> g.version -g
version=7.1.svn
date=2014
revision=61158
build_date=2014-07-06
build_platform=i686-pc-mingw32

it fails with:

Launching <wxpython> GUI in the background, please wait...
GRASS 7.1.svn> Traceback (most recent call last):
  File "C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\wxgui.py", line
138, in
<module>
    sys.exit(main())
  File "C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\wxgui.py", line
131, in
main
    app = GMApp(workspaceFile)
  File "C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\wxgui.py", line
45,
in
__init__
    wx.App.__init__(self, False)
  File
"C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.p
y", line 7981, in __init__
    self._BootstrapApp()
  File
"C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.p
y", line 7555, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\wxgui.py", line
79,
in
OnInit
    workspace = self.workspaceFile)
  File "C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\lmgr\frame.py",
line 12
1, in __init__
    self._moduleTreeBuilder = LayerManagerModuleTree()
  File "C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\lmgr\menudata.py",
line
62, in __init__
    MenuTreeModelBuilder.__init__(self, filename,
expandAddons=expandAddons)
  File "C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\core\menutree.py",
line
66, in __init__
    expAddons(xmlTree)
  File
"C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\core\toolboxes.py",
lin
e 271, in expandAddons
    _expandAddonsItem(root)
  File
"C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\core\toolboxes.py",
lin
e 431, in _expandAddonsItem
    addons = _getAddons()
  File
"C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\core\toolboxes.py",
lin
e 404, in _getAddons
    flags='a').splitlines())
  File "C:\OSGeo4W\apps\grass\grass-7.1.svn\gui\wxpython\core\gcmd.py",
line
704
, in RunCommand
    ps = grass.start_command(GetRealCmd(prog), flags, overwrite, quiet,
verbose,
**kwargs)
  File
"C:\OSGeo4W\apps\grass\grass-7.1.svn\etc\python\grass\script\core.py", li
ne 354, in start_command
    return Popen(args, **popts)
  File
"C:\OSGeo4W\apps\grass\grass-7.1.svn\etc\python\grass\script\core.py", li
ne 58, in __init__
    raise OSError
OSError

It's because gui doesn't reflect recent changes by Martin. I temporarily
fixed it in r61171 but I don't really understand current status, is it
still work in progress? By the way the Popen class should be changed
according two Glynn's suggestions to let Popen throw the error.

Anna

-----
best regards
Helmut
--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/Re-GRASS-SVN-r60679-grass-trunk-lib-python-script-tp5143645p5149811.html
Sent from the Grass - Dev mailing list archive at Nabble.com.
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Hi,

2014-07-07 21:58 GMT+02:00 Anna Petrášová <kratochanna@gmail.com>:

It's because gui doesn't reflect recent changes by Martin. I temporarily
fixed it in r61171 but I don't really understand current status, is it still
work in progress? By the way the Popen class should be changed according two
Glynn's suggestions to let Popen throw the error.

feel free to implement Glynn's suggestions. I do not have time to try
to make WinGRASS 71 working again. Martin

--
Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa

Anna Petrášová wrote

On Sun, Jul 6, 2014 at 3:59 AM, Helmut Kudrnovsky &lt;

hellik@

&gt; wrote:

"C:\OSGeo4W\apps\grass\grass-7.1.svn\etc\python\grass\script\core.py", li
ne 58, in __init__
    raise OSError
OSError

It's because gui doesn't reflect recent changes by Martin. I temporarily
fixed it in r61171 but I don't really understand current status, is it
still work in progress? By the way the Popen class should be changed
according two Glynn's suggestions to let Popen throw the error.

Anna

tested with:

System Info
GRASS Version: 7.1.svn
GRASS SVN Revision: 61180
Erstellungsdatum: 2014-07-08
Build Platform: i686-pc-mingw32
GDAL/OGR: 1.11.0
PROJ.4: 4.8.0
GEOS: 3.4.2
SQLite: 3.7.17
Python: 2.7.4
wxPython: 2.8.12.1
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)

the GUI starts now, thanks.

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Re-GRASS-SVN-r60679-grass-trunk-lib-python-script-tp5143645p5150047.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

On Tue, Jul 8, 2014 at 4:13 AM, Helmut Kudrnovsky <hellik@web.de> wrote:

Anna Petrášová wrote
> On Sun, Jul 6, 2014 at 3:59 AM, Helmut Kudrnovsky &lt;

> hellik@

> &gt; wrote:
>
>> "C:\OSGeo4W\apps\grass\grass-7.1.svn\etc\python\grass\script\core.py",
li
>> ne 58, in __init__
>> raise OSError
>> OSError
>>
>>
>>
>
> It's because gui doesn't reflect recent changes by Martin. I temporarily
> fixed it in r61171 but I don't really understand current status, is it
> still work in progress? By the way the Popen class should be changed
> according two Glynn's suggestions to let Popen throw the error.
>
> Anna

tested with:

System Info
GRASS Version: 7.1.svn
GRASS SVN Revision: 61180
Erstellungsdatum: 2014-07-08
Build Platform: i686-pc-mingw32
GDAL/OGR: 1.11.0
PROJ.4: 4.8.0
GEOS: 3.4.2
SQLite: 3.7.17
Python: 2.7.4
wxPython: 2.8.12.1
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)

the GUI starts now, thanks.

g.gui.* modules are not found, there is no bat file created for them. Could
something similar to this be used for them as well? Otherwise everything
seems to be working.
http://trac.osgeo.org/grass/changeset/61136

Anna

-----
best regards
Helmut
--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/Re-GRASS-SVN-r60679-grass-trunk-lib-python-script-tp5143645p5150047.html
Sent from the Grass - Dev mailing list archive at Nabble.com.
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Anna Petrášová wrote

the GUI starts now, thanks.

g.gui.* modules are not found, there is no bat file created for them.
Could
something similar to this be used for them as well? Otherwise everything
seems to be working.
http://trac.osgeo.org/grass/changeset/61136

Anna

g.gui.* which are linked in the main GUI are starting, but can't be invoked
in the wxGUI-command line.

also again, python addon scripts needs again bat-files in windows.

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Re-GRASS-SVN-r60679-grass-trunk-lib-python-script-tp5143645p5150331.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

Hi,

2014-07-09 17:32 GMT+02:00 Helmut Kudrnovsky <hellik@web.de>:

also again, python addon scripts needs again bat-files in windows.

also user-defined script will need bat files... Martin

--
Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa