[Qgis-developer] fTools: selection problems

Giovanni Manghi giovanni.manghi at gmail.com
Wed May 19 05:58:13 EDT 2010


Here (qgis trunk, ubuntu 9.04)the tool does not returns any error, but
it takes like 5 minutes to plot 10 random points.

cheers

-- Giovanni --


On Wed, 2010-05-19 at 11:40 +0200, Paolo Cavallini wrote:
> Also random point generation fails:
> 
> Traceback (most recent call last):
> File "/usr/share/qgis/python/plugins/fTools/tools/doRandPoints.py", line
> 124, in accept
> self.randomize(inLayer, outPath, minimum, design, value)
> File "/usr/share/qgis/python/plugins/fTools/tools/doRandPoints.py", line
> 186, in randomize
> else: points = self.loopThruPolygons(inLayer, value, design)
> File "/usr/share/qgis/python/plugins/fTools/tools/doRandPoints.py", line
> 227, in loopThruPolygons
> value = sAtMap[index].toInt()[0]
> UnboundLocalError: local variable 'index' referenced before assignment
> 
> Strangely enough, this does not happen with some PC, for unknown reasons.
> 
> 
> On Wed, 19 May 2010 11:35:15 +0200, Paolo Cavallini <cavallini at faunalia.it>
> wrote:
> > Hi all.
> > Using current trunk, the fTools selection tools have problems:
> > - selecting a number of features does not work (% is ok)
> > - stratified selection throws an error:
> > 
> > Traceback (most recent call last):
> > File "/usr/share/qgis/python/plugins/fTools/tools/doSubsetSelect.py",
> line
> > 79, in accept
> > self.compute(inVect, uidField, value, perc, self.progressBar)
> > File "/usr/share/qgis/python/plugins/fTools/tools/doSubsetSelect.py",
> line
> > 107, in compute
> > if atMap[index] == QVariant(i):
> > KeyError: 9
> > 
> > Versione Python:
> > 2.6.5 (r265:79063, Mar 18 2010, 23:59:47) 
> > [GCC 4.4.3]
> > 
> > All the best.
> 



More information about the Qgis-developer mailing list