qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.29k stars 2.96k forks source link

Error in Basic statistics for numeric fields #23664

Closed qgib closed 5 years ago

qgib commented 7 years ago

Author Name: Paolo Cavallini (@pcav) Original Redmine Issue: 15742 Affected QGIS version: 2.18.0 Redmine category:processing/qgis Assignee: Victor Olaya


running the alg from Processing I get:

Uncaught error while executing algorithm
            Traceback (most recent call last):
              File
"/usr/share/qgis/python/plugins/processing/core/GeoAlgorithm.py", line
203, in execute
                self.processAlgorithm(progress)
              File
"/usr/share/qgis/python/plugins/processing/algs/qgis/BasicStatisticsNumbers.py",
line 175, in processAlgorithm
                data.append(self.tr('Interquartile Range (IQR): {}').format(iqr))
            ValueError: Single '{' encountered in format string
qgib commented 7 years ago

Author Name: Paolo Cavallini (@pcav)


Still true for 2.18


qgib commented 7 years ago

Author Name: Alexander Bruy (@alexbruy)


Can't reproduce using Processing and QGIS test data. Can you share dataset which causes this?

qgib commented 7 years ago

Author Name: Paolo Cavallini (@pcav)


It happens with any data here, just tested.

qgib commented 7 years ago

Author Name: Alexander Bruy (@alexbruy)


Strange. Can't reproduce locally, and as I can see Travis also does not report any failure for this alg

qgib commented 7 years ago

Author Name: Paolo Cavallini (@pcav)


Very strange indeed. Could it be due to a different version of a lib? I just tested again, and confirm the issue.


qgib commented 7 years ago

Author Name: Giovanni Manghi (@gioman)


Work fine here on 2.18 on both Windows (standalone) and Ubuntu 16.04, with any data.


qgib commented 7 years ago

Author Name: Giovanni Manghi (@gioman)


Paolo Cavallini wrote:

Very strange indeed. Could it be due to a different version of a lib? I just tested again, and confirm the issue.

can you test on another machine (with a different os/os version)? thanks.

qgib commented 7 years ago

Author Name: Paolo Cavallini (@pcav)


Sure, already planned, next days during a course, with several machines. Thanks for checking.

qgib commented 7 years ago

Author Name: Paolo Cavallini (@pcav)


Verified on 10 Windows boxes, it works on only 2 of them, same error confirmed for the other 8.

qgib commented 7 years ago

Author Name: Giovanni Manghi (@gioman)


Paolo Cavallini wrote:

Verified on 10 Windows boxes, it works on only 2 of them, same error confirmed for the other 8.

where it fails, are all clean installations? have you tried purge the .qgis2 folder and see if anything changes? On clean installations it does not fail.

qgib commented 7 years ago

Author Name: Paolo Cavallini (@pcav)


This happens in 9 machines, with a variety of settings. Some of them have uninstalled 2.16 before installing 2.18, some starts from a clean .qgis2. It works in machines with a long history of installations. I can do further testing after the course.

qgib commented 7 years ago

Author Name: Alexander Bruy (@alexbruy)


Still can not reproduce on Windows and Linux, also tests for this alg passed on Travis. Looks like local issue.

qgib commented 7 years ago

Author Name: Giovanni Manghi (@gioman)


I can do further testing after the course.

further testing to find the likely local issue are needed. Please reopen if you find a real evidence of a core qgis problem.


qgib commented 6 years ago

Author Name: Joao Paulouro (Joao Paulouro)


I can confirm the bug on a QGIS 2.18.13 installation via homebrew on mac. The issue seems to only affect values with decimals (numeric, real, etc) and can only reproduce on Postgis layers. Same layer exported as a shapefile works.

qgib commented 6 years ago

Author Name: Giovanni Manghi (@gioman)


Joao Paulouro wrote:

I can confirm the bug on a QGIS 2.18.13 installation via homebrew on mac. The issue seems to only affect values with decimals (numeric, real, etc) and can only reproduce on Postgis layers. Same layer exported as a shapefile works.

chekc if you have a "processing" folder in ~/.qgis2/python/plugins/

if yes delete it, restart qgis and try again.


Uncaught error while executing algorithm
            Traceback (most recent call last):
              File
"/usr/share/qgis/python/plugins/processing/core/GeoAlgorithm.py", line
203, in execute
                self.processAlgorithm(progress)
              File
"/usr/share/qgis/python/plugins/processing/algs/qgis/BasicStatisticsNumbers.py",
line 175, in processAlgorithm
                data.append(self.tr('Interquartile Range (IQR): {}').format(iqr))
            ValueError: Single '{' encountered in format string
to running the alg from Processing I get:
Uncaught error while executing algorithm
            Traceback (most recent call last):
              File
"/usr/share/qgis/python/plugins/processing/core/GeoAlgorithm.py", line
203, in execute
                self.processAlgorithm(progress)
              File
"/usr/share/qgis/python/plugins/processing/algs/qgis/BasicStatisticsNumbers.py",
line 175, in processAlgorithm
                data.append(self.tr('Interquartile Range (IQR): {}').format(iqr))
            ValueError: Single '{' encountered in format string