3nids / quickfinder

Quick Finder is a QGIS 2.x plugin offering a single place to perform searches on project layers and online remote services
http://3nids.github.io/quickfinder/
Other
8 stars 14 forks source link

AttributeError: 'NoneType' object has no attribute 'centroid' #40

Closed gilleschapron closed 8 years ago

gilleschapron commented 9 years ago

Hi,

Il would like to index a interger field as I usually do, but with de file I choose, I have the folowing error:

Une erreur est apparue lors de l'exécution du code Python :

Traceback (most recent call last): File "C:/OSGEO4~1/apps/qgis/./python/plugins\quickfinder\gui\projectsearchdialog.py", line 78, in > process ok, message = self.projectFinder.recordSearch(self.projectSearch) File "C:/OSGEO4~1/apps/qgis/./python/plugins\quickfinder\core\projectfinder.py", line 233, in # # > recordSearch cur.executemany(sql, self.expressionIterator(layer, expression)) File "C:/OSGEO4~1/apps/qgis/./python/plugins\quickfinder\core\projectfinder.py", line 261, in # # > expressionIterator if f.geometry().centroid() is None: AttributeError: 'NoneType' object has no attribute 'centroid'

Version de Python : 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]

Version de QGIS : 2.10.1-Pisa Pisa, d20c5b7

Do you have any idea where this error comes from (from my data ?). Thanks for your help, and for your job on this very usefull plugin.

Gilles