Send grass-windows mailing list submissions to
        grass-windows@lists.osgeo.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.osgeo.org/mailman/listinfo/grass-windows
or, via email, send a message with subject or body 'help' to
        grass-windows-requ...@lists.osgeo.org

You can reach the person managing the list at
        grass-windows-ow...@lists.osgeo.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of grass-windows digest..."


Today's Topics:

   1. Re: r.basin for windows [was Re:  WinGrass6.5.svn-installer
      with selected addons] (Margherita Di Leo)
   2. Re: r.basin for windows [was Re:  WinGrass6.5.svn-installer
      with selected addons] (Glynn Clements)
   3. Re: r.basin for windows [was Re: WinGrass6.5.svn-installer
      with selected addons] (Helmut Kudrnovsky)
   4. Re: r.basin for windows [was Re: WinGrass6.5.svn-installer
      with selected addons] (Helmut Kudrnovsky)


----------------------------------------------------------------------

Message: 1
Date: Thu, 20 Oct 2011 17:04:45 +0200
From: Margherita Di Leo <direg...@gmail.com>
Subject: Re: [GRASS-windows] r.basin for windows [was Re:
        WinGrass6.5.svn-installer with selected addons]
To: alecto...@gmx.at
Cc: Markus Metz <markus.metz.gisw...@googlemail.com>,   Glynn Clements
        <gl...@gclements.plus.com>,     grass-windows@lists.osgeo.org, Helmut
        Kudrnovsky <hel...@web.de>
Message-ID:
        <CABa=8qrfb+wtdbldnnhmmg1ua_krfazajmxh+okjkjzmb4c...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi Helmut,

Thanks for your testing. Actually to me it looks like a problem in the
environment variable*
PYTHONPATH.***<http://docs.python.org/using/cmdline.html#envvar-PYTHONPATH>Maybe
someone has any idea on how to fix it?

Thanks,
madi

2011/10/19 Helmut Kudrnovsky <alecto...@gmx.at>

> Hi Margherita,
>
> I've added for testing manually your scripts r.basin, r.ipso, r.wf to an
> installed wingrass65:
>
> - r.basin => r.basin-wxgui pops up, but if I do following with the
> nc-sample-dataset:
>
> r.basin.py -a --verbose map=elevation@PERMANENT prefix=hk easting=637033
> northing=223553
>
> there are following error messages:
>
>        Traceback (most recent call last):
>        File "C:\Program Files\GRASS 6.5.SVN\scripts\r.basin.py",
>        line 67, in <module>
>        import grass.script as grass
>        File "c:\Program Files\GRASS
>        6.5.SVN\etc\python\grass\script\__init__.py", line 1, in
>        <module>
>        from core   import *
>        File "c:\Program Files\GRASS
>        6.5.SVN\etc\python\grass\script\core.py", line 31, in
>        <module>
>        import subprocess
>        File "C:\Program Files\GRASS
>        6.5.SVN\Python25\lib\subprocess.py", line 376, in <module>
>        import threading
>        File "C:\Program Files\GRASS
>        6.5.SVN\Python25\lib\threading.py", line 13, in <module>
>        from collections import deque
>        ImportError: No module named collections
>        (Wed Oct 19 22:31:07 2011) Command finished (2 sec)
>
> BUT if I'm starting it from the wingrass-msys-shell, your script is
> starting, but there are a some warning and errors (see attached log),
> and some r.stream.* seems to crash.
>
> - r.ipso
>
>        Traceback (most recent call last):
>          File "c:\Program Files\GRASS
>        6.5.SVN\etc\wxpython\gui_modules\prompt.py", line 804, in
>        OnItemSelected
>
>        self.cmdDesc = gtask.parse_interface(cmd)
>          File "c:/osgeo4w/usr/src/grass6_devel/dist.i686-pc-
>        mingw32/etc/python/grass/script/task.py", line 451, in
>        parse_interface
>          File
>        "c:\OSGeo4W\apps\Python25\lib\xml\etree\ElementTree.py",
>        line 964, in XML
>
>        return parser.close()
>          File
>        "c:\OSGeo4W\apps\Python25\lib\xml\etree\ElementTree.py",
>        line 1254, in close
>
>        self._parser.Parse("", 1) # end of data
>        xml.parsers.expat
>        .
>        ExpatError
>        :
>        no element found: line 1, column 0
>
> - r.wf:
>
>        Traceback (most recent call last):
>          File "c:\Program Files\GRASS
>        6.5.SVN\etc\wxpython\gui_modules\prompt.py", line 1098, in
>        OnKeyPressed
>
>        self.parent.RunCmd(cmd)
>          File "c:\Program Files\GRASS
>        6.5.SVN\etc\wxpython\gui_modules\goutput.py", line 534, in
>        RunCmd
>
>        task = gtask.parse_interface(command[0])
>          File "c:/osgeo4w/usr/src/grass6_devel/dist.i686-pc-
>        mingw32/etc/python/grass/script/task.py", line 451, in
>        parse_interface
>          File
>        "c:\OSGeo4W\apps\Python25\lib\xml\etree\ElementTree.py",
>        line 964, in XML
>
>        return parser.close()
>          File
>        "c:\OSGeo4W\apps\Python25\lib\xml\etree\ElementTree.py",
>        line 1254, in close
>
>        self._parser.Parse("", 1) # end of data
>        xml.parsers.expat
>        .
>        ExpatError
>        :
>        no element found: line 1, column 0
>
> best regards
> Helmut
>
> Am 14.10.2011 10:32, schrieb Margherita Di Leo:
> > Hi,
> >
> > 2011/10/13 Glynn Clements <gl...@gclements.plus.com>
> >
> >>
> >> Helmut Kudrnovsky wrote:
> >>
> >>> any ideas? I don't know if python-scripts are recognised correctly in
> >> build
> >>> process.
> >>
> >> They aren't.
> >>
> >> And the rules can't simply be back-ported from 7.0 because 7.0's
> >> Script.make only works for Python scripts, not for shell scripts.
> >>
> >>
> > Sorry I am a bit confused. If I understand, there is no way to compile
> any
> > python script on grass 6 series? Is that related to windows or is
> platform
> > independent?
> > I tried to compile r.basin on debian and I do have problems as well. I
> would
> > have bet that it was working when i committed it, but I'm not sure at
> this
> > point.
> > But.. could it be a problem in the makefile? I'm not sure I wrote it
> > correctly. Please could anyone more experienced than me give a look at
> it?
> >
> > Thanks,
> >
> > madi
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://lists.osgeo.org/pipermail/grass-windows/attachments/20111020/b4ff4e21/attachment-0001.html

------------------------------

Message: 2
Date: Thu, 20 Oct 2011 16:49:59 +0100
From: Glynn Clements <gl...@gclements.plus.com>
Subject: Re: [GRASS-windows] r.basin for windows [was Re:
        WinGrass6.5.svn-installer with selected addons]
To: alecto...@gmx.at
Cc: grass-windows@lists.osgeo.org, Helmut Kudrnovsky <hel...@web.de>
Message-ID: <20128.17191.80238.594...@cerise.gclements.plus.com>
Content-Type: text/plain; charset=us-ascii


Helmut Kudrnovsky wrote:

> there are following error messages:

> File "C:\Program Files\GRASS6.5.SVN\Python25\lib\threading.py", line 13, in 
> <module>
> from collections import deque
> ImportError: No module named collections

This is a common error caused by a broken Python installation or
attempting to mix Python versions (e.g. setting PYTHONPATH or
PYTHONHOME to point to one version but using the Python interpreter
from a different version).

With respect to GRASS, the usual reason for this error is the attempt
to "bundle" a copy of Python in the GRASS installer.

Bear in mind that, on Windows, "executing" a Python script (whether
from cmd.exe, the GUI, or via subprocess.Popen() or os.system()) will
use the Python interpreter associated with the .py extension. If
PYTHONHOME and/or PYTHONPATH refer to a different version, it will
break.

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


------------------------------

Message: 3
Date: Thu, 20 Oct 2011 09:27:46 -0700 (PDT)
From: Helmut Kudrnovsky <hel...@web.de>
Subject: [GRASS-windows] Re: r.basin for windows [was Re:
        WinGrass6.5.svn-installer with selected addons]
To: grass-windows@lists.osgeo.org
Message-ID: <1319128066353-6913629.p...@n2.nabble.com>
Content-Type: text/plain; charset=us-ascii

Glynn Clements:
>Helmut Kudrnovsky wrote:
>
>> there are following error messages:
>
>> File "C:\Program Files\GRASS6.5.SVN\Python25\lib\threading.py", line 13,
>> in <module>
>> from collections import deque
>> ImportError: No module named collections
>
>This is a common error caused by a broken Python installation or
>attempting to mix Python versions (e.g. setting PYTHONPATH or
>PYTHONHOME to point to one version but using the Python interpreter
>from a different version). 

ok. 

there is the python bundled with wingrass65 and a few other ones i.e.
installed by arcgis
(in C:\Python26\ArcGIS10.0\) or by openoffice (in C:\Program
Files\OpenOffice.org 3\program) 
or inkscape (C:\Program Files\Inkscape\python) etc. here on my box.

so some source of messing up? why is then the wxgui working normally?

>With respect to GRASS, the usual reason for this error is the attempt
>to "bundle" a copy of Python in the GRASS installer. 
>
>Bear in mind that, on Windows, "executing" a Python script (whether
>from cmd.exe, the GUI, or via subprocess.Popen() or os.system()) will
>use the Python interpreter associated with the .py extension. If
>PYTHONHOME and/or PYTHONPATH refer to a different version, it will
>break. 

is it possible to test which python interpreter is associated with the
.py-extension?

thanks 
Helmut

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/WinGrass6-5-svn-installer-with-selected-addons-tp6873977p6913629.html
Sent from the Grass - Win mailing list archive at Nabble.com.


------------------------------

Message: 4
Date: Thu, 20 Oct 2011 09:38:30 -0700 (PDT)
From: Helmut Kudrnovsky <hel...@web.de>
Subject: [GRASS-windows] Re: r.basin for windows [was Re:
        WinGrass6.5.svn-installer with selected addons]
To: grass-windows@lists.osgeo.org
Message-ID: <1319128710344-6913691.p...@n2.nabble.com>
Content-Type: text/plain; charset=us-ascii

Helmut Kudrnovsky:
>>Bear in mind that, on Windows, "executing" a Python script (whether
>>from cmd.exe, the GUI, or via subprocess.Popen() or os.system()) will
>>use the Python interpreter associated with the .py extension. If
>>PYTHONHOME and/or PYTHONPATH refer to a different version, it will
>>break.
>
>is it possible to test which python interpreter is associated with the
.py-extension? 

I've searched through the windows registry:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.6\PythonPath]
@="C:\\Python26\\ArcGIS10.0\\Lib;C:\\Python26\\ArcGIS10.0\\DLLs;C:\\Python26\\ArcGIS10.0\\Lib\\lib-tk"

??

Helmut



Helmut

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/WinGrass6-5-svn-installer-with-selected-addons-tp6873977p6913691.html
Sent from the Grass - Win mailing list archive at Nabble.com.


------------------------------

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


End of grass-windows Digest, Vol 60, Issue 17
*********************************************

Reply via email to