[GRASS-dev] [GRASS GIS] #3727: t.rast.aggregate fails with python3

GRASS GIS trac at osgeo.org
Sat Jan 5 08:05:08 PST 2019


#3727: t.rast.aggregate fails with python3
---------------------------------------+-------------------------
 Reporter:  veroandreo                 |      Owner:  grass-dev@…
     Type:  defect                     |     Status:  new
 Priority:  normal                     |  Milestone:  7.8.0
Component:  Temporal                   |    Version:  svn-trunk
 Keywords:  t.rast.aggregate, python3  |        CPU:  Unspecified
 Platform:  Unspecified                |
---------------------------------------+-------------------------
 Here's how to reproduce:

 {{{
 g.region raster=elevation
 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.aggregate in=A out=B granularity="2 months" method=average
 basename=b_bimonthly suffix=gran
 }}}

 and this is the error I get:

 {{{
 Traceback (most recent call last):
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
 gnu/scripts/t.rast.aggregate", line 219, in <module>
     main()
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
 gnu/scripts/t.rast.aggregate", line 196, in main
     overwrite=gcore.overwrite(), file_limit=file_limit)
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/temporal/aggregation.py", line 230, in
 aggregate_by_topology
     topo_builder.build(mapsA=granularity_list, mapsB=map_list,
 spatial=spatial)
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/temporal/spatio_temporal_relationships.py", line 569,
 in build
     self._build_internal_iteratable(mapsA, spatial)
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/temporal/spatio_temporal_relationships.py", line 411,
 in _build_internal_iteratable
     self._detect_first()
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64-pc-linux-
 gnu/etc/python/grass/temporal/spatio_temporal_relationships.py", line 378,
 in _detect_first
     prev_ = self._store.values()[0]
 TypeError: 'dict_values' object does not support indexing
 WARNING:root:Needed to restart the libgis server, caller: Server check
 thread
 }}}

 It works fine in 76 rel branch. I am using trunk r73904 in virtualenv with
 python3.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3727>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list