[GRASS-dev] grass7 addon python script - finishes in normal and --verbose mode, but not in --quiet mode

Anna Petrášová kratochanna at gmail.com
Thu Nov 13 15:00:05 PST 2014


On Thu, Nov 13, 2014 at 3:44 PM, Helmut Kudrnovsky <hellik at web.de> wrote:

> tested here with:
>
> GRASS Version: 7.1.svn
> GRASS SVN Revision: 62712
> Erstellungsdatum: 2014-11-12
> 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)
>
> running the addon script [1] in normal and --verbose mode:
>
> v.fixed.segmentpoints vector=iselflipped at myricaria cat=1
> dir=C:\tmp\grassscript distance=25000
> Extract vector line for which segment points should be calculated ...
> [...]
> ----
> v.fixed.segmentpoints done!
> (Thu Nov 13 21:36:52 2014) Befehl ausgeführt (43 Sek)
>
> v.fixed.segmentpoints --verbose vector=iselflipped at myricaria cat=1
> dir=C:\tmp\grassscript distance=25000
> Extract vector line for which segment points should be calculated ...
> [...]
> ----
> v.fixed.segmentpoints done!
> (Thu Nov 13 21:39:03 2014) Befehl ausgeführt (35 Sek)
>
> it works.
>
> but in --quiet mode it fails with:
>
> v.fixed.segmentpoints --quiet vector=iselflipped at myricaria cat=1
> dir=C:\tmp\grassscript distance=25000
> Traceback (most recent call last):
>   File "C:\Users\myricaria\AppData\Roaming\GRASS7\addons/scr
> ipts/v.fixed.segmentpoints.py", line 226, in <module>
>     sys.exit(main())
>   File "C:\Users\myricaria\AppData\Roaming\GRASS7\addons/scr
> ipts/v.fixed.segmentpoints.py", line 100, in main
>     vector_line_length =
> float(tmp.split('\n')[1].split('|')[1])
> IndexError: list index out of range
> (Thu Nov 13 21:40:08 2014) Befehl ausgeführt (2 Sek)
>
> any idea?
>

Could you try to print tmp with and without quiet?

>
> thanks
>
> [1]
>
> http://trac.osgeo.org/grass/browser/grass-addons/grass7/vector/v.fixed.segmentpoints
>
>
>
>
>
> -----
> best regards
> Helmut
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/grass7-addon-python-script-finishes-in-normal-and-verbose-mode-but-not-in-quiet-mode-tp5172902.html
> Sent from the Grass - Dev mailing list archive at Nabble.com.
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20141113/8550834d/attachment.html>


More information about the grass-dev mailing list