olivierdalang / liveStats

LiveStats is a plugin for QGis
0 stars 3 forks source link

error for label with selection unchecked #10

Open enricofer opened 10 years ago

enricofer commented 10 years ago

The plugin looks great but i found it faulty. I get the following error trying to define a live stat with selection unchecked. Error appears In windows7 and in windows xp

Errore durante l'esecuzione di codice Python:

Traceback (most recent call last): File "C:/Users/DEMO/.qgis2/python/plugins\LiveStats\LSbar.py", line 126, in dialogAccepted self.compute() File "C:/Users/DEMO/.qgis2/python/plugins\LiveStats\LSbar.py", line 222, in compute for feature in getFeatures(): TypeError: 'QgsVectorLayer' object is not iterable

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

Versione di QGIS: 2.2.0-Valmiera Valmiera, c3a2817

Percorso Python: ['C:/Users/DEMO/.qgis2/python/plugins\processing', 'C:/OSGEO4~1/apps/qgis/./python', u'C:/Users/DEMO/.qgis2/python', u'C:\Users\DEMO\Documents\dev', u'C:/Users/DEMO/.qgis2/python/plugins', 'C:/OSGEO4~1/apps/qgis/./python/plugins', 'C:\OSGeo4W64\apps\Python27\Lib', 'C:\OSGeo4W64\apps\Python27\DLLs', 'C:\OSGEO4~1\bin\python27.zip', 'C:\OSGEO4~1\apps\Python27\DLLs', 'C:\OSGEO4~1\apps\Python27\lib', 'C:\OSGEO4~1\apps\Python27\lib\plat-win', 'C:\OSGEO4~1\apps\Python27\lib\lib-tk', 'C:\OSGEO4~1\bin', 'C:\OSGEO4~1\apps\Python27', 'C:\OSGEO4~1\apps\Python27\lib\site-packages', 'C:\OSGEO4~1\apps\Python27\lib\site-packages\PIL', 'C:\OSGEO4~1\apps\Python27\lib\site-packages\win32', 'C:\OSGEO4~1\apps\Python27\lib\site-packages\win32\lib', 'C:\OSGEO4~1\apps\Python27\lib\site-packages\Pythonwin', 'C:\OSGEO4~1\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg', 'C:\OSGEO4~1\apps\Python27\lib\site-packages\six-1.3.0-py2.7.egg', 'C:\OSGEO4~1\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', 'C:\OSGEO4~1\apps\Python27\lib\site-packages\xlrd-0.9.2-py2.7.egg', 'C:\OSGEO4~1\apps\Python27\lib\site-packages\xlwt-0.7.5-py2.7.egg', 'C:\Users\DEMO.qgis2\python\plugins\MetaSearch\ext-libs', 'C:\OSGEO4~1\apps\qgis\python\plugins\fTools\tools', 'C:/Users/DEMO/Documents']

enricofer commented 9 years ago

issue can be fixed changing line 219 of LSbar.py from: return layer to: return layer.getFeatures()