[GRASS-dev] GRASS 7 scripts overhaul
Markus Neteler
neteler at osgeo.org
Tue Sep 6 03:24:09 EDT 2011
On Tue, Sep 6, 2011 at 7:31 AM, Glynn Clements <glynn at gclements.plus.com> wrote:
> It's m.proj which is broken:
>
> p = grass.Popen(cmd, stdin = grass.PIPE, stdout = grass.PIPE)
>
> cs2cs' stdout is redirected to a pipe, but the script never reads it.
>
> It needs:
>
> --- scripts/m.proj/m.proj.py (revision 48154)
> +++ scripts/m.proj/m.proj.py (working copy)
> @@ -235,7 +235,7 @@
> # cs2cs | sed -e 's/d/:/g' -e "s/'/:/g" -e 's/"//g'
>
> cmd = ['cs2cs'] + copyinp + outfmt + in_proj.split() + ['+to'] + out_proj.split()
> - p = grass.Popen(cmd, stdin = grass.PIPE, stdout = grass.PIPE)
> + p = grass.Popen(cmd, stdin = grass.PIPE)
>
> while True:
> line = inf.readline()
Fixe in r48160.
This leads now to:
v.out.gps -t input=railroads output=trail.gpx
Traceback (most recent call last):
File "/home/neteler/grass70/dist.x86_64-unknown-linux-gnu/scripts/m.proj",
line 278, in <module>
main()
File "/home/neteler/grass70/dist.x86_64-unknown-linux-gnu/scripts/m.proj",
line 260, in main
for line in p.communicate()[0].splitlines():
AttributeError: 'NoneType' object has no attribute 'splitlines'
ERROR: Error reprojecting data
Markus
More information about the grass-dev
mailing list