Bug report #15352
Dissolve error : "local variable 'nElement' referenced before assignment"
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Victor Olaya | ||
Category: | Processing/QGIS | ||
Affected QGIS version: | 2.14.3 | Regression?: | No |
Operating System: | Mac OS | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 23284 |
Description
I'm experiencing the same issue as described in this recent thread : #14612
But the solution that closes the thread doesn't work for me. I'm a Mac user, and I tried deleting the folder /Users/williambray/.qgis2/processing, but that doesn't solve the problem in QGIS, and folder returns when I load QGIS again.
The Mac OS build provider includes these notes in the readme :
"Known Issues - Processing Configuration
If you have problems enabling algorithm providers or running algorithms, try resetting the "path" to the problem provider. Do this by deleting whatever is currently in the path setting for the provider, Processing should then automatically find the builtin path."
But how does one reset the path to the problem provider in this case?
thanks
Ben Bray
MIT Sea Grant
Related issues
History
#1 Updated by Giovanni Manghi over 8 years ago
- Status changed from Open to Feedback
(if there) the folder you must delete is
/Users/williambray/.qgis2/python/plugins/processing
not
/Users/williambray/.qgis2/processing
#2 Updated by Ben Bray over 8 years ago
'/Users/williambray/.qgis2/python/plugins/processing' does not exist. the only contents of the python folder is the folder 'expressions'
#3 Updated by Alexander Bruy over 8 years ago
- Category changed from Processing/Modeller to Processing/QGIS
Please provider full error message.
#4 Updated by Ben Bray over 8 years ago
Sorry for the delay - thanks for your help Alexander. Here's the full error message, which results from running a model containing a Dissolve as its last step:
Algorithm model1 starting...
Prepare algorithm: QGISFIXEDDISTANCEBUFFER_1
Running subway stations Fixed distance buffer [1/4]
Parameters: INPUT =/Users/williambray/Desktop/O/MITSG_desktop/DO/QGIS_Level_2_Exercise_July2016/clippedstations.shp, DISTANCE =500, SEGMENTS =5, DISSOLVE =True
Converting outputs
OK. Execution took 2.103 ms (1 outputs).
Prepare algorithm: QGISINTERSECTION_1
Running Intersection Zones [2/4]
Parameters: INPUT =/var/folders/b4/2q1t8h715x907926cpjft84c0000gn/T/processing79eec01207d04cc5abc74b13a69eb488/84f36e1b2894480098feb948d941ee34/OUTPUTALGQGISFIXEDDISTANCEBUFFER1.shp, INPUT2 =/Users/williambray/Desktop/O/MITSG_desktop/DO/QGIS_Level_2_Exercise_July2016/clippedzoningdistricts.shp
Converting outputs
OK. Execution took 1.048 ms (1 outputs).
Prepare algorithm: QGISINTERSECTION_2
Running Intersection School [3/4]
Parameters: INPUT =/Users/williambray/Desktop/O/MITSG_desktop/DO/QGIS_Level_2_Exercise_July2016/clippedschools.shp, INPUT2 =/var/folders/b4/2q1t8h715x907926cpjft84c0000gn/T/processing79eec01207d04cc5abc74b13a69eb488/09eae90a64644ccc83061f3f201dafc4/OUTPUTALGQGISINTERSECTION1.shp
Converting outputs
OK. Execution took 0.576 ms (1 outputs).
Prepare algorithm: QGISDISSOLVE_1
Running Dissolve [4/4]
Parameters: INPUT =/var/folders/b4/2q1t8h715x907926cpjft84c0000gn/T/processing79eec01207d04cc5abc74b13a69eb488/c62e00389c374c828f0e3d653f0ea8e4/OUTPUTALGQGISINTERSECTION2.shp, DISSOLVE_ALL =False, FIELD =SCHOOLDIST
Failed
Error executing algorithm Dissolve local variable 'nElement' referenced before assignment See log for more details
#5 Updated by Alexander Bruy over 8 years ago
And what do you have in QGIS log (bubble in the bottom right corner of QGIS window)?
#6 Updated by Ben Bray over 8 years ago
2016-08-02T11:36:28 2 Uncaught error while executing algorithm
Traceback (most recent call last):
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/GeoAlgorithm.py", line 203, in execute
self.processAlgorithm(progress)
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/algs/qgis/Dissolve.py", line 129, in processAlgorithm
nElement += 1
UnboundLocalError: local variable 'nElement' referenced before assignment
2016-08-02T11:36:28 2 Error executing algorithm Dissolve
local variable 'nElement' referenced before assignment
See log for more details
#7 Updated by Alexander Bruy over 8 years ago
As I can see from code this error already fixed. Please make sure that you have no Processing plugin installed in your user directory (~/.qgis2/python/plugins) and check with latest point release
#8 Updated by Ben Bray over 8 years ago
'/Users/williambray/.qgis2/python/plugins/processing' does not exist. the only contents of the python folder is the folder 'expressions'
I'm running the latest point release available for Macs (2.14.3) as indicated on the QGIS website.
Where does the code say this error is already fixed?
#9 Updated by Alexander Bruy over 8 years ago
- Status changed from Feedback to Closed
#10 Updated by Ben Bray over 8 years ago
- Status changed from Closed to Reopened
- Target version set to Version 2.14
This issue was erroneously closed without resolution.
Picking-up where we left-off...
1) I do not have a a Processing plugin installed in my user directory - '~/.qgis2/python/plugins/processing' does not exist.
2) I'm running the latest point release available for Macs (2.14.3) as indicated on the QGIS website.
Any suggestions on what to do next?
thank you
Ben
#11 Updated by Alexander Bruy over 8 years ago
- Status changed from Reopened to Closed
Issue fixed in latest point release (maybe also in previous too). Latest point release is 2.14.5