[GRASS-dev] Scripting in Linux

Kim Besson kimbesson1981 at gmail.com
Tue Jan 26 05:32:12 EST 2010


Hello Mr. Clements

But, for instance, I have just made a NDVI script (i.ndvi) and I added the
file to my script folder  but I got the following error:
Traceback (most recent call last):
  File "/usr/local/grass-6.4.0svn/etc/wxpython/wxgui.py",
line 466, in OnRunCmd

self.goutput.RunCmd(cmd, switchPage=False)
  File "/usr/local/grass-6.4.0svn/etc/wxpython/gui_modules/g
output.py", line 352, in RunCmd

menuform.GUI().ParseCommand(cmdlist, parentframe=self)
  File "/usr/local/grass-6.4.0svn/etc/wxpython/gui_modules/m
enuform.py", line 1822, in ParseCommand

handler)
  File "/usr/lib/python2.6/xml/sax/__init__.py", line 49, in
parseString

parser.parse(inpsrc)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line
107, in parse

xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python2.6/xml/sax/xmlreader.py", line 123,
in parse

self.feed(buffer)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line
211, in feed

self._err_handler.fatalError(exc)
  File "/usr/lib/python2.6/xml/sax/handler.py", line 38, in
fatalError

raise exception
xml.sax._exceptions
.
SAXParseException
:
<unknown>:5:3: not well-formed (invalid token)

Could you tell me what's wrong? Am I suppose to do something else?

Best regards,
Kim

2010/1/25 Glynn Clements <glynn at gclements.plus.com>

>
> Kim Besson wrote:
>
> > I'm having a few Questions regarding Scripting developing and compilation
> > for LINUX. I have "coded" a Script example, from GRASS book, and now I
> just
> > want to try it. But it says "Command d.rast.region is not yet
> implemented".
> > Do I have to do something because it's already in the right
> > folder /usr/local/grass-6.4.0svn/scripts.
>
> The "not yet implemented" error occurs if you run unknown d.* commands
> (any command beginning with "d.") from the GUI's interactive prompt.
> Essentially, support for running d.* within the GUI is an ugly hack;
> it "traps" a fixed set of known commands, but doesn't work for
> anything else.
>
> You should still be able to use the script from the shell, or by
> adding a command layer within the GUI.
>
> --
> Glynn Clements <glynn at gclements.plus.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20100126/d157d27f/attachment.html


More information about the grass-dev mailing list