Bug report #10040

singleparts to multipart fails (python error)

Added by matteo ghetta over 6 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Processing/QGIS
Affected QGIS version:2.2.0 Regression?:
Operating System: Easy fix?:
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:18521

Description

The tool works nice when the Unique ID field is a field of the table. It fails when the option merge - all is activated. Nothing is added to the map canvas.
I tried with different shapefiles but nothing changes. In attach you can find a sample file.
This is the error in the log:

An error has occured while executing Python code:

Traceback (most recent call last):
File "/usr/share/qgis/python/plugins/fTools/tools/doGeometry.py", line 326, in run
success = self.single_to_multi()
File "/usr/share/qgis/python/plugins/fTools/tools/doGeometry.py", line 396, in single_to_multi
if idVarMod == iMod or merge_all:
UnboundLocalError: local variable 'idVarMod' referenced before assignment

Python version:
2.7.3 (default, Mar 14 2014, 12:14:27)
[GCC 4.7.2]

QGIS version:
2.2.0-Valmiera Valmiera, exported

Python path: ['/home/ma7730/.qgis2/python/plugins/processing', '/usr/share/qgis/python', u'/home/ma7730/.qgis2/python', u'/home/ma7730/.qgis2/python/plugins', '/usr/share/qgis/python/plugins', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/home/ma7730/.local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode', '/usr/share/qgis/python/plugins/fTools/tools', '/home/ma7730/.qgis2/python/plugins/midvatten']

example.zip (436 KB) matteo ghetta, 2014-04-10 12:13 AM

History

#1 Updated by dr - over 6 years ago

Confirm this issue.

#2 Updated by Andrey Isakov over 6 years ago

Yes, same issue.

#4 Updated by Salvatore Larosa over 6 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

Fixed in master. Please reopen if necessary.

#5 Updated by Giovanni Manghi over 3 years ago

The "ftools" category is being removed from the tracker, changing the category of this ticket to "Processing/QGIS" to not leave the category orphaned.

Also available in: Atom PDF