Ticket #2508 (closed bug: worksforme)

Opened 3 years ago

Last modified 3 years ago

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

Reported by: lutra Owned by: cfarmer
Priority: major: does not work as expected Milestone: Version 1.5.0
Component: Python plugins and bindings Version: Trunk
Keywords: Cc: gislab, alexbruy
Platform Version: Platform: Debian
Must Fix for Release: Yes Awaiting user input: no

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]

Change History

Changed 3 years ago by alexbruy

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

Changed 3 years ago by alexbruy

  • cc alexbruy added

Changed 3 years ago by lutra

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

Changed 3 years ago by alexbruy

  • status changed from new to closed
  • resolution set to worksforme

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

Note: See TracTickets for help on using tickets.