[GRASS-user] Script i.histo.match

Hi everybody,

I have problem with i.histo.match.py in GRASS on Ubuntu.
I have downloaded i.histo.match. py from
https://svn.osgeo.org/grass/grass-addons/grass7/imagery/i.histo.match/
I tried to run the script by command: python i.histo.match.py, but it doesn’t work.
I have GRASS 6.4.1. and error messsage is:

GRASS 6.4.1 (barvy):~ > python Stažené/i.histo.match.py
Unknown command “option G_OPT_R_INPUTS” at line 25
Unknown command “description” at line 26
Unknown command “required” at line 27
Unknown command “end” at line 28
Unknown command “option G_OPT_R_OUTPUT” at line 29
Unknown command “description” at line 30
Unknown command “required” at line 31
Unknown command “answer” at line 32
Unknown command “end” at line 33
Unknown command “option G_OPT_DB_DATABASE” at line 34
Unknown command “required” at line 35
Unknown command “answer” at line 36
Unknown command “end” at line 37
Traceback (most recent call last):
File “/usr/lib/grass64/etc/wxpython/gui_modules/menuform.py”, line
2207, in
task = grassTask(cmd[0])
File “/usr/lib/grass64/etc/wxpython/gui_modules/menuform.py”, line
361, in init
processTask(tree =
etree.fromstring(getInterfaceDescription(grassModule)),
File “/usr/lib/grass64/etc/wxpython/gui_modules/menuform.py”, line
1970, in getInterfaceDescription
“Details: %s”) % (cmd, e.value)
AttributeError: ‘exceptions.OSError’ object has no attribute ‘value’

I search something about this problem and I find information about
GRASS 7 and their new modules for python. I install GRASS 7, but this
version gives error message:

Starting GRASS GIS…
Traceback (most recent call last):
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/gis_set.py”, line 36, in

from core import globalvar
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/core/globalvar.py”, line 28, in

from core.debug import Debug
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/core/debug.py”, line 67, in

Debug = DebugMsg()
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/core/debug.py”, line 38, in
init
self.SetLevel()
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/core/debug.py”, line 43, in
SetLevel
self.debuglevel = int(grass.gisenv().get(‘WX_DEBUG’, 0))
File “/usr/local/grass-7.0.svn/etc/python/grass/script/core.py”, line
735, in gisenv
s = read_command(“g.gisenv”, flags=‘n’)
File “/usr/local/grass-7.0.svn/etc/python/grass/script/core.py”, line 278,
in read_command
ps = pipe_command(*args, **kwargs)
File “/usr/local/grass-7.0.svn/etc/python/grass/script/core.py”, line 255,
in pipe_command
return start_command(*args, **kwargs)
File “/usr/local/grass-7.0.svn/etc/python/grass/script/core.py”, line 217,
in start_command
return Popen(args, **popts)
File “/usr/local/grass-7.0.svn/etc/python/grass/script/core.py”, line 56, in
init
startupinfo, creationflags)
File “/usr/lib/python2.7/subprocess.py”, line 679, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1249, in
_execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Error in GUI startup. If necessary, please report this error to the GRASS developers.
Switching to text mode now.

I have python version 2.7 and 3.
I find this comunication http://osgeo-org.1560.n6.nabble.com/OSError-importing-CSV-file-with-a-Python-Script-td4998910.html
But I don’t underestand - Can I copy this environment variables and paste to the .bashrc?

Thank you

Marketa Prusova

=

On Fri, Feb 15, 2013 at 2:22 PM, <PrusovaM@email.cz> wrote:

Hi everybody,

I have problem with i.histo.match.py in GRASS on Ubuntu.
I have downloaded i.histo.match. py from
https://svn.osgeo.org/grass/grass-addons/grass7/imagery/i.histo.match/

--> you see, it has been written for GRASS 7, but...

I tried to run the script by command: python i.histo.match.py, but it
doesn't work.
I have GRASS 6.4.1. and error messsage is:

... you try to run it in GRASS 6.

This would require modifications in the Python script.

Note that there is a GRASS 7 snapshot binary in preparation for
Ubuntu:
http://grass.osgeo.org/download/software/linux/
--> GRASS 7

It may be completed soon.

Markus