[Qgis-developer] error in fTools in 1.5

Paolo Cavallini cavallini at faunalia.it
Wed May 12 06:56:44 EDT 2010


One more error, in generating random points with subsets. Again, in 1.4 all
ok.
===
Traceback (most recent call last):
File "/usr/share/qgis/python/plugins/fTools/tools/doRandPoints.py", line
122, in accept
self.randomize(inLayer, outPath, minimum, design, value)
File "/usr/share/qgis/python/plugins/fTools/tools/doRandPoints.py", line
183, in randomize
else: points = self.loopThruPolygons(inLayer, value, design)
File "/usr/share/qgis/python/plugins/fTools/tools/doRandPoints.py", line
224, in loopThruPolygons
value = sAtMap[index].toInt()[0]
UnboundLocalError: local variable 'index' referenced before assignment

On Wed, 12 May 2010 12:50:41 +0200, Paolo Cavallini <cavallini at faunalia.it>
wrote:
> Hi all.
> Select by subset gives an error in 1.5. All ok in 1.4:
> 
> ===
> Errore durante l'esecuzione di codice Python:
> 
> Traceback (most recent call last):
> File "/usr/share/qgis/python/plugins/fTools/tools/doSubsetSelect.py",
line
> 77, in accept
> self.compute(inVect, uidField, value, perc, self.progressBar)
> File "/usr/share/qgis/python/plugins/fTools/tools/doSubsetSelect.py",
line
> 119, in compute
> if atMap[index] == QVariant(i):
> KeyError: 9
> 
> Errore durante l'esecuzione di codice Python:
> 
> Traceback (most recent call last):
> File "/usr/share/qgis/python/plugins/fTools/tools/doSubsetSelect.py",
line
> 77, in accept
> self.compute(inVect, uidField, value, perc, self.progressBar)
> File "/usr/share/qgis/python/plugins/fTools/tools/doSubsetSelect.py",
line
> 108, in compute
> mlayer.removeSelection(True)
> AttributeError: 'NoneType' object has no attribute 'removeSelection'

-- 
http://faunalia.it/pc


More information about the Qgis-developer mailing list