Bug report #2508

ftools: mean coordinate tool returns error when used on spatialite vector

Added by Giovanni Manghi almost 15 years ago. Updated over 14 years ago.

Status:Closed
Priority:Low
Assignee:cfarmer -
Category:Python plugins
Affected QGIS version: Regression?:No
Operating System:Debian Easy fix?:No
Pull Request or Patch supplied: Resolution:worksforme
Crashes QGIS or corrupts data: Copied to github as #:12568

Description

Tested on qgis trunk, Ubuntu 9.10 and with the spatialite sample dataset.

With he same vector (regions) saved as shapefile the tool works ok.

An error has occured while executing Python code:

Traceback (most recent call last):
  File "/usr/share/qgis/python/plugins/fTools/tools/doMeanCoords.py", line 62, in accept
    self.compute(inName, outPath, self.weightField.currentText(), self.sizeValue.value(), self.uniqueField.currentText())
  File "/usr/share/qgis/python/plugins/fTools/tools/doMeanCoords.py", line 150, in compute
    cx = cx / sumWeight
[[ZeroDivisionError]]: float division

Python version:
2.6.4 (r264:75706, Dec  7 2009, 19:02:09) 
[GCC 4.4.1]

History

#1 Updated by Alexander Bruy over 14 years ago

Can't reproduce with my data. Can you attach a sample and explain all actions to get this error?

#2 Updated by Giovanni Manghi over 14 years ago

Hi,

Now I cannot test again with a more recent code, but then I:

*) used the spatialite sample dataset (you find it in the SL site)

*) tested the "regions" layer with the "mean coordinate" tool available in the "vector" menu

#3 Updated by Alexander Bruy over 14 years ago

  • Resolution set to worksforme
  • Status changed from Open to Closed

Can't reproduce with SpatiaLite sample data and with my own spatialite data. Reopen if necessary

Also available in: Atom PDF