[GRASS-dev] [GRASS GIS] #3682: t.rast.algebra: Error wrong type of input
GRASS GIS
trac at osgeo.org
Sun Oct 14 15:25:31 PDT 2018
#3682: t.rast.algebra: Error wrong type of input
----------------------------+-------------------------
Reporter: veroandreo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.8.0
Component: Temporal | Version: svn-trunk
Keywords: t.rast.algebra | CPU: Unspecified
Platform: Unspecified |
----------------------------+-------------------------
When running any expression with G7:t.rast.algebra in trunk, I get ERROR:
Wrong type of input. Here's how to reproduce:
{{{
for map in `seq 1 10` ; do r.mapcalc "prueba_${map} = ${map}" ; done
t.create output=A type=strds temporaltype=absolute title="test"
description="test"
t.register input=A maps=`g.list rast pat=prueba* sep=, map=.`
start="2000-01-01" increment="1 months" -i
t.rast.algebra expression="test = (A[1] - A[0]) / 2" basename=test
suffix=gran
t.rast.algebra expression="test = A * 2" basename=test suffix=gran
}}}
Both algebra commands yield the following error:
{{{
ERROR: Wrong type of input A
Traceback (most recent call last):
File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
gnu/scripts/t.rast.algebra", line 132, in <module>
sys.exit(main())
File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
gnu/scripts/t.rast.algebra", line 124, in main
pc = p.parse(expression, basename, grass.script.overwrite())
File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/temporal/temporal_raster_algebra.py", line 112, in
parse
self.parser.parse(expression)
File "/usr/lib/python2.7/site-packages/ply/yacc.py", line 331, in parse
return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
File "/usr/lib/python2.7/site-packages/ply/yacc.py", line 1118, in
parseopt_notrack
p.callable(pslice)
File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/temporal/temporal_raster_algebra.py", line 137, in
p_ts_neighbour_operation
maplist = self.check_stds(t[1])
File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/temporal/temporal_algebra.py", line 1226, in
check_stds
self.msgr.fatal(_("Wrong type of input " + str(input)))
File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/pygrass/messages/__init__.py", line 269, in fatal
raise FatalError(message)
grass.exceptions.FatalError: Wrong type of input A
}}}
Is this related to the python3 encoding issues? It works fine in 76
relbranch.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3682>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list