[GRASS-dev] Re: Scripting in Linux (Kim Besson)

Kim, probably you have a special character in your module/Option (such as á, à , ã or something). Right?

Because I'm using Ubuntu 9.10 and I have already coded a NDVI function, very similar to yours, and it's working just fine. as soon as I put a character like those, I get an error like
*(python:3562): Pango-CRITICAL **: pango_layout_get_cursor_pos: assertion `index >= 0 && index <= layout->length' failed*
and huge wxPython GUI error in command window.

Antonio

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

Subject:
Re: [GRASS-dev] Scripting in Linux
From:
Kim Besson <kimbesson1981@gmail.com>
Date:
Tue, 26 Jan 2010 15:39:59 +0000
To:
Glynn Clements <glynn@gclements.plus.com>, grass-dev@lists.osgeo.org

To:
Glynn Clements <glynn@gclements.plus.com>, grass-dev@lists.osgeo.org
CC:

Yeah sure...
The following was printed in TERMINAL:
(python:2176): Gtk-CRITICAL **: gtk_widget_event: assertion `WIDGET_REALIZED_FOR_EVENT (widget, event)' failed

And at the command output it was:
<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
<!DOCTYPE task SYSTEM "grass-interface.dtd">
<task name="i.ndvi">
<description>
NDVI Calculus
</description>
<keywords>
DW-E, raster, imagery, vegetation
</keywords>
<parameter name="bandnir" type="string" required="yes" multiple="no">
<description>
raster input map (Near Infrared)
</description>
<gisprompt age="old" element="cell" prompt="raster" />
</parameter>
<parameter name="bandred" type="string" required="yes" multiple="no">
<description>
raster input map (Red)
</description>
<gisprompt age="old" element="cell" prompt="raster" />
</parameter>
<parameter name="ndvi" type="string" required="yes" multiple="no">
<description>
raster output NDVI map
</description>
<gisprompt age="new" element="cell" prompt="raster" />
</parameter>
<flag name="overwrite">
<description>
Allow output files to overwrite existing files
</description>
</flag>
<flag name="verbose">
<description>
Verbose module output
</description>
</flag>
<flag name="quiet">
<description>
Quiet module output
</description>
</flag>
</task>
(Tue Jan 26 15:38:40 2010) Command finished (0 sec)
          
This gives us any light?

2010/1/26 Glynn Clements <glynn@gclements.plus.com <mailto:glynn@gclements.plus.com>>

    Kim Besson wrote:

    > 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:

    > SAXParseException
    > :
    > <unknown>:5:3: not well-formed (invalid token)
    >
    > Could you tell me what's wrong? Am I suppose to do something else?

    Can you post the output from "i.ndvi --interface-description" ?

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

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

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

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4807 (20100126) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4807 (20100126) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

You are absolutely right Antonio.

Do anyone knows how to have Special Characters in Module (e.g. á, é).

Thanks

PS- At my WinGRASS I had those special characters

2010/1/26 António Rocha <antonio.rocha@deimos.com.pt>

Kim, probably you have a special character in your module/Option (such as á, à , ã or something). Right?

Because I’m using Ubuntu 9.10 and I have already coded a NDVI function, very similar to yours, and it’s working just fine. as soon as I put a character like those, I get an error like
*(python:3562): Pango-CRITICAL *: pango_layout_get_cursor_pos: assertion `index >= 0 && index <= layout->length’ failed
and huge wxPython GUI error in command window.

Antonio


Subject:
Re: [GRASS-dev] Scripting in Linux
From:
Kim Besson <kimbesson1981@gmail.com>
Date:
Tue, 26 Jan 2010 15:39:59 +0000
To:
Glynn Clements <glynn@gclements.plus.com>, grass-dev@lists.osgeo.org

To:
Glynn Clements <glynn@gclements.plus.com>, grass-dev@lists.osgeo.org
CC:

Yeah sure…
The following was printed in TERMINAL:
(python:2176): Gtk-CRITICAL **: gtk_widget_event: assertion `WIDGET_REALIZED_FOR_EVENT (widget, event)’ failed

And at the command output it was:

<?xml version="1.0" encoding="ANSI_X3.4-1968"?> NDVI Calculus DW-E, raster, imagery, vegetation raster input map (Near Infrared) raster input map (Red) raster output NDVI map Allow output files to overwrite existing files Verbose module output Quiet module output (Tue Jan 26 15:38:40 2010) Command finished (0 sec)

This gives us any light?

2010/1/26 Glynn Clements <glynn@gclements.plus.com mailto:[glynn@gclements.plus.com](mailto:glynn@gclements.plus.com)>

Kim Besson wrote:

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:

SAXParseException
:
:5:3: not well-formed (invalid token)

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

Can you post the output from “i.ndvi --interface-description” ?


Glynn Clements <glynn@gclements.plus.com
mailto:[glynn@gclements.plus.com](mailto:glynn@gclements.plus.com)>



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

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4807 (20100126) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4807 (20100126) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


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

Franz Schiller wrote:

You are absolutely right Antonio.

Do anyone knows how to have Special Characters in Module (e.g. á, é).

Thanks

PS- At my WinGRASS I had those special characters

It's supposed to work, but there do appear to be some problems with
the GUI.

The main issue is that any strings which appear within option
definitions (either in C programs or in scripts) should only use
ASCII; the translations (in .po files) can use any characters which
the .po file's encoding supports (take care to note the encoding of
the .po file; don't insert UTF-8 into an ISO-8859-* .po file or
vice-versa).

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