[GRASS-dev] [GRASS GIS] #2902: i.segment.hierarchical: Execution of subprocesses was not successful

Moritz Lennert mlennert at club.worldonline.be
Wed Sep 7 13:00:08 PDT 2016


On 07/09/16 12:07, Markus Neteler wrote:
> On Wed, Sep 7, 2016 at 11:36 AM, GRASS GIS <trac at osgeo.org
> <mailto:trac at osgeo.org>> wrote:
>> #2902: i.segment.hierarchical: Execution of subprocesses was not
> successful
> ...
>>  Setting this to True led me to a
>>  bug in pygrass which still had a call to type='rast' instead of
>>  type='raster'. Corrected in trunk in r69392.
>
> There appear to be some more to be fixed but I cannot say which ones
> are false positives in this sloppy grep search (sorry for the HTML
> formatting to preserve line breaks):
>
> find . -type f | xargs grep "'rast'" | grep -v svn/pristine
> ./scripts/r.shade/r.shade.py <http://r.shade.py>:
> type='rast', name=maps)
> ./scripts/r.grow/r.grow.py
> <http://r.grow.py>:                              type='rast', name=map)
> ./gui/wxpython/psmap/dialogs.py:            {'rast': self.currRaster,
> 'type': rasterType})
> ./gui/wxpython/psmap/dialogs.py:            {'rast': currRaster, 'type':
> str(rasterType)})
> ./gui/wxpython/lmgr/layertree.py:            module = 'rast'
> ./lib/python/gunittest/gutils.py:    if type == 'rast' or  type == 'raster':
> ./lib/python/pygrass/raster/abstract.py:        utils.remove(self.name
> <http://self.name>, 'rast')
> ./lib/python/pygrass/raster/abstract.py:
> utils.rename(self.name <http://self.name>, newname, 'rast')
> ./lib/python/pygrass/modules/grid/grid.py:                 for r in
> findmaps('rast', location=dst[1], gisdbase=dst[2])]
> ./lib/python/pygrass/modules/interface/testsuite/test_parameter.py:
> param = Parameter(diz=dict(name='rast', required='yes',
> ./lib/python/pygrass/modules/interface/testsuite/test_parameter.py:
> param = Parameter(diz=dict(name='rast', required='yes',
> ./lib/python/temporal/temporal_algebra.py:              maptype='rast',
> mapclass=RasterDataset,
> ./lib/python/script/core.py:    if element == 'raster' or element == 'rast':
>
>
> find . -type f | xargs grep "'vect'" | grep -v svn/pristine
> ./scripts/v.db.reconnect.all/v.db.reconnect.all.py
> <http://v.db.reconnect.all.py>:    vectors =
> gscript.list_grouped('vect')[mapset]
> ./scripts/v.build.all/v.build.all.py <http://v.build.all.py>:    vectors
> = grass.list_grouped('vect')[mapset]
> ./gui/wxpython/lmgr/layertree.py:            module = 'vect'
> ./lib/python/gunittest/gutils.py:    elif type == 'vect':
> ./lib/python/pygrass/utils.py:    >>> remove('test_vect_2','vect')
> ./lib/python/pygrass/vector/table.py:        >>>
> copy(test_vector_name,'mycensus','vect')
> ./lib/python/pygrass/vector/table.py:        >>> remove('mycensus', 'vect')
> ./lib/python/pygrass/vector/table.py:        >>>
> copy(test_vector_name,'mycensus','vect')
> ./lib/python/pygrass/vector/table.py:        >>> remove('mycensus', 'vect')
> ./lib/python/pygrass/vector/table.py:        >>>
> copy(test_vector_name,'mycensus','vect')
> ./lib/python/pygrass/vector/table.py:        >>> remove('mycensus', 'vect')
> ./lib/python/pygrass/vector/table.py:        >>>
> copy(test_vector_name,'mycensus','vect')
> ./lib/python/pygrass/vector/table.py:        >>> remove('mycensus','vect')
> ./lib/python/pygrass/vector/abstract.py:
> utils.rename(self.name <http://self.name>, newname, 'vect')
> ./lib/python/pygrass/vector/abstract.py:        utils.remove(self.name
> <http://self.name>, 'vect')
> ./lib/python/pygrass/vector/__init__.py:        >>>
> copy(test_vector_name,'mytest_vect','vect')
> ./lib/python/pygrass/vector/__init__.py:        >>>
> remove('mytest_vect', 'vect')
> ./lib/python/script/core.py:    >>> list_grouped('vect',
> pattern='*roads*')['PERMANENT']
> ./lib/python/script/db.py:    vects = list_strings('vect')
>
>
> ... anyone willing to go through and fix the few true Python issues?
>
> Those should then also be backported to 7.2.svn.

I'd rather have some of the real pygrass and script library experts look 
at this, but AFAICS, none of these (except for grid.py call to findmaps 
(but which I already fixed in trunk) actually cause any trouble. I think 
it was the specfic findmaps function call that uses a ctypes call that 
caused the issue.

But maybe someone else could confirm or infirm this ?

Moritz


More information about the grass-dev mailing list