[GRASS-dev] [GRASS GIS] #3753: g.gui.tplot and g.gui.timeline: AttributeError: 'itertools.cycle' object has no attribute 'next'

GRASS GIS trac at osgeo.org
Sat Feb 16 01:34:43 PST 2019


#3753: g.gui.tplot and g.gui.timeline: AttributeError: 'itertools.cycle' object
has no attribute 'next'
--------------------------+-------------------------------
  Reporter:  veroandreo   |      Owner:  grass-dev@…
      Type:  defect       |     Status:  reopened
  Priority:  normal       |  Milestone:  7.8.0
 Component:  wxGUI        |    Version:  svn-trunk
Resolution:               |   Keywords:  temporal, python3
       CPU:  Unspecified  |   Platform:  Linux
--------------------------+-------------------------------
Changes (by neteler):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 There are a some more occurrences in the code, should they be fixed in the
 same way?


 {{{
 ag --python "\.next\(\)"
 scripts/d.rast.edit/d.rast.edit.py
 343:            it.Next()

 temporal/t.rast.accdetect/t.rast.accdetect.py
 369:                        prev_map =
 occurrence_maps[map.next().get_id()].get_name()
 382:                        prev_map =
 occurrence_maps[map.next().get_id()].get_name()
 392:                        next_map =
 occurrence_maps[map.next().get_id()].get_name()

 gui/wxpython/tplot/frame.py
 689:            color = self.colors.next()
 736:            color = self.colors.next()
 781:            color = self.colors.next()

 lib/python/temporal/temporal_topology_dataset_connector.py
 58:               start = start.next()
 509:        if self.next() is not None:
 510:            print(" | Next: ...................... " +
 str(self.next().get_id()))
 550:        if self.next() is not None:
 551:            print("next=" + self.next().get_id())

 lib/python/temporal/spatio_temporal_relationships.py
 74:                first = first.next()
 442:            next_ = map_.next()
 581:            start_ = start_.next()

 lib/python/pygrass/vector/__init__.py
 96:            >>> test_vect.next()
 98:            >>> test_vect.next()
 457:            >>> test_vect.next()
 459:            >>> test_vect.next()
 461:            >>> test_vect.next()
 464:            >>> test_vect.next()
 }}}

 and

 {{{
 ag --python "zip\("
 scripts/g.extension/g.extension.py
 1062:def extract_zip(name, directory, tmpdir):
 1064:    gscript.debug("extract_zip(name={name}, directory={directory},"
 1120:        extract_zip(name=zip_name, directory=directory,
 tmpdir=tmpdir)
 1131:        extract_zip(name=url, directory=directory, tmpdir=tmpdir)

 scripts/i.oif/i.oif.py
 135:    for i, row in zip(bands, lines[1:]):
 136:        for j, cell in zip(bands, row.split(' ')):

 scripts/v.report/v.report.py
 208:            records3 = [[r1] + [r4] for r1, r4 in zip(records1,
 records4)]
 210:            records3 = [r1 + [r4] for r1, r4 in zip(records1,
 records4)]

 scripts/i.image.mosaic/i.image.mosaic.py
 93:    for img, offset in zip(images, offsets):

 temporal/t.rast3d.univar/testsuite/test_univar.py
 57:        for ref, res in zip(univar_text.split("\n"),
 t_rast3d_univar.outputs.stdout.split("\n")):
 75:        for ref, res in zip(univar_text.split("\n"),
 t_rast3d_univar.outputs.stdout.split("\n")):
 95:        for ref, res in zip(univar_text.split("\n"),
 univar_output.split("\n")):
 114:        for ref, res in zip(univar_text.split("\n"),
 univar_output.split("\n")):

 temporal/t.vect.observe.strds/t.vect.observe.strds.py
 233:        for name, column in zip(raster_names, column_names):
 270:        for name, column in zip(raster_names, column_names):

 temporal/t.connect/testsuite/test_distr_tgis_db_raster.py
 82:        for a, b in zip(list_string.split("\n"), out.split("\n")):
 93:        for a, b in zip(list_string.split("\n"),
 read_data.split("\n")):
 112:        for a, b in zip(list_string.split("\n"), out.split("\n")):
 125:        for a, b in zip(list_string.split("\n"), out.split("\n")):
 138:        for a, b in zip(list_string.split("\n"), out.split("\n")):
 151:        for a, b in zip(list_string.split("\n"), out.split("\n")):
 164:        for a, b in zip(list_string.split("\n"), out.split("\n")):
 173:        for a, b in zip(list_string.split("\n"),
 read_data.split("\n")):

 temporal/t.connect/testsuite/test_distr_tgis_db_raster3d.py
 82:        for a, b in zip(list_string.split("\n"), out.split("\n")):
 93:        for a, b in zip(list_string.split("\n"),
 read_data.split("\n")):
 112:        for a, b in zip(list_string.split("\n"), out.split("\n")):
 125:        for a, b in zip(list_string.split("\n"), out.split("\n")):
 138:        for a, b in zip(list_string.split("\n"), out.split("\n")):
 151:        for a, b in zip(list_string.split("\n"), out.split("\n")):
 160:        for a, b in zip(list_string.split("\n"),
 read_data.split("\n")):

 temporal/t.connect/testsuite/test_distr_tgis_db_vector.py
 81:        for a, b in zip(list_string.split("\n"), out.split("\n")):
 92:        for a, b in zip(list_string.split("\n"),
 read_data.split("\n")):
 113:        for a, b in zip(list_string.split("\n"), out.split("\n")):
 128:        for a, b in zip(list_string.split("\n"), out.split("\n")):
 143:        for a, b in zip(list_string.split("\n"), out.split("\n")):
 158:        for a, b in zip(list_string.split("\n"), out.split("\n")):
 168:        for a, b in zip(list_string.split("\n"),
 read_data.split("\n")):

 temporal/t.rast.univar/testsuite/test_univar.py
 57:        for ref, res in zip(univar_text.split("\n"),
 t_rast_univar.outputs.stdout.split("\n")):
 76:        for ref, res in zip(univar_text.split("\n"),
 t_rast_univar.outputs.stdout.split("\n")):
 95:        for ref, res in zip(univar_text.split("\n"),
 t_rast_univar.outputs.stdout.split("\n")):
 116:        for ref, res in zip(univar_text.split("\n"),
 univar_output.split("\n")):
 136:        for ref, res in zip(univar_text.split("\n"),
 univar_output.split("\n")):

 raster3d/r3.to.rast/testsuite/test_a_b_coeff.py
 153:        for rast_ref, rast in zip(self.rast2d_refs, rasts):

 raster3d/r3.to.rast/testsuite/test_small_data.py
 153:        for rast_ref, rast in zip(self.rast2d_refs, rasts):

 raster3d/r3.to.rast/testsuite/test_integer_rounding.py
 153:        for rast_ref, rast in zip(self.rast2d_refs, rasts):

 raster3d/r3.to.rast/testsuite/test_nulls.py
 159:        for rast_ref, rast in zip(self.rast2d_refs, rasts):

 gui/wxpython/iclass/toolbars.py
 223:        for name, idx in zip(catNames, catIdx):

 gui/wxpython/iscatt/plots.py
 114:        pol = Polygon(list(zip([0], [0])), animated=True)
 120:        self.zoom_rect = Polygon(list(zip([0], [0])),
 facecolor='none')
 652:        x, y = zip(*self.pol.xy)
 839:        self.line.set_data(zip(*self.pol.xy))
 859:                self.line.set_data(zip(*self.pol.xy))
 877:        self.line.set_data(zip(*self.pol.xy))
 906:        self.line.set_data(zip(*self.pol.xy))

 gui/wxpython/iscatt/controllers.py
 150:        self.all_bands_to_bands = dict(zip(bands, [-1] * len(bands)))

 gui/wxpython/startup/locdownload.py
 130:def extract_zip(name, directory, tmpdir):
 132:    debug("extract_zip(name={name}, directory={directory},"
 204:        extract_zip(name=archive_name, directory=directory,
 tmpdir=tmpdir)

 gui/wxpython/nviz/mapwindow.py
 1077:        for key, val in zip(('x', 'y', 'z'),
 self._display.GetViewdir()):

 gui/wxpython/nviz/tools.py
 3112:        for win, name in zip((w, n, s, e, nw, ne, se, sw),
 4827:        for coord, val in zip(

 gui/wxpython/gui_core/simplelmgr.py
 148:        for label, text in zip(labels, texts):

 gui/wxpython/psmap/instructions.py
 753:            zip(['width', 'height', 'left', 'right', 'top', 'bottom'],
 self.cats))
 803:            d = dict(zip(self.cats, line.split()[1:]))

 gui/wxpython/mapswipe/toolbars.py
 117:        for label, cdata in zip(

 gui/wxpython/psmap/dialogs.py
 536:        self.catsLabels = dict(zip(self.cat, labels))
 723:            d = dict(zip([self.cat[1]] + self.cat[3:], line.split()))
 4336:                for vmap, vector in zip(vmaps, vList):
 4955:        for item, path in zip(['fancy', 'simple'], imagePath):

 gui/wxpython/animation/data.py
 264:                for value, region in zip(values, regions):

 gui/wxpython/animation/nviztask.py
 102:        for attr, params in zip(attributes, parameters):
 129:        for mode1, mode2 in zip(
 184:                for attr, params in zip(attributes, parameters):

 gui/wxpython/animation/temporal_manager.py
 208:        for mapList, labelList in zip(mapLists, labelLists):
 445:    for name, fname in zip((name1, name2), (n1, n2)):
 520:    for name, fname in zip((name1, name2), (n1, n2)):

 gui/wxpython/animation/provider.py
 121:        for cmdList, region in zip(self._cmdsForComposition,
 self._regions):
 138:            for cmd, region in zip(self._uniqueCmds,
 142:            for cmdList, region in zip(
 162:        for cmd, region in zip(uniqueCmds, regions):
 185:        for cmdList, region in zip(cmdLists, regions):
 351:        for cmd, region in zip(cmdList, regions):
 469:        for cmdList, region in zip(cmdLists, regions):

 gui/wxpython/animation/dialogs.py
 229:        for item, cdata in zip(timeUnitsChoice, timeUnits):
 994:        for buttonName, buttonLabel in zip(buttonNames, buttonLabels):

 gui/wxpython/animation/utils.py
 344:    return list(zip(*cmdsForComposition))

 gui/wxpython/animation/controller.py
 53:        for anim, win in zip(self.animations, self.mapwindows):
 362:                     region in zip(anim.cmdMatrix, regions)])
 533:        for i, (win, anim) in enumerate(zip(self.mapwindows,
 self.animations)):

 gui/wxpython/tplot/frame.py
 653:            zipped = zip(x, *y)
 655:            zipped = zip(x, y)
 1189:            ys = zip(*info[1].values())[1]

 lib/python/gunittest/multirunner.py
 141:    for location, location_type in zip(locations, locations_types):

 lib/python/gunittest/multireport.py
 325:        for image, caption in itertools.izip(images, captions):

 lib/python/ctypes/ctypesgencore/parser/yacc.py
 2024:   for _x,_y in zip(_v[0],_v[1]):
 2062:   for _x,_y in zip(_v[0],_v[1]):

 lib/python/ctypes/ctypesgencore/parser/parsetab.py
 13:   for _x,_y in zip(_v[0],_v[1]):
 21:   for _x,_y in zip(_v[0],_v[1]):

 lib/python/pygrass/modules/interface/module.py
 627:        for param, arg in zip(self.params_list, args):

 lib/python/pygrass/vector/table.py
 433:                   for cn, ct in zip(col_name, col_type)]

 lib/python/pygrass/vector/testsuite/test_vector3d.py
 44:            for x, y, z in zip(self.x, self.y, self.z):

 lib/python/pygrass/vector/testsuite/test_table.py
 69:    return np.array([v for v in zip(*vals)], dtype=dtype)

 lib/python/pygrass/vector/geometry.py
 225:        for key, val in zip(self.keys(), self.values()):

 lib/python/pygrass/vector/testsuite/test_geometry.py
 338:        for boundary, i in zip(boundaries, range(4)):

 lib/python/imaging/images2gif.py
 429:        for im, palette in zip(images, palettes):
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3753#comment:2>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list