I have this small problem with QGIS 2.18.4 Las Palmas. I just downloaded it and tried to merge vector layers, but i've got error: "global name 'dataobjects' is not defined".
I didn't change anything that in my opinion could cause this problem. Although I wanted to use lastools via QGIS, so I connected it in previous version (as far as I remember it was QGIS 2.14) and due to some errors I had to remove some folder paths to Grass, but everything worked just fine, so it's probably not the cause.
I tried to merge shapes by the plugin, but it didn't work either.
Any ideas how i can fix this?
-
hub.qgis.org/issues/16292 looks like a 2.18.4 bug. Works fine in 2.14.12. Looks like a regression, i remind me it was working in 2.18.3– jlStaCommented Mar 10, 2017 at 11:01
-
QGIS 2.18.4 Las Palmas 64 bits : Same problem: "Merge vector layers global name 'dataobjects' is not defined". Reinstalling long term release: 2.14.12-Essen ->Problem solved– Christophe P.Commented Mar 10, 2017 at 14:28
-
1Will be fixed in 2.18.5– Matthias KuhnCommented Mar 10, 2017 at 15:21
-
I've changed Merge.py file (following the code from hub.qgis.org/issues/16292) and now it works just fine. Thanks a lot!– Julia StrzyżCommented Mar 10, 2017 at 23:36
3 Answers
I'm running 2.18.4 as well and just found this thread searching for a fix. I tried using the MMQGIS plugin's 'Merge Layers' function to successfully combine 50+ shapefiles into one file -- worked like a charm.
Just ran into the same issue and figured out a work around.
Toggle the two layers 'on' for editing. Select all of the features you want to merge from layer A , copy. Highlight layer B in the layers panel, paste. Toggle off editing and save changes.
Probably make a copy of both files before hand also.
I have no idea why we're getting the error "global name 'dataobjects' is not defined", but this got me through the issue.
I've been running, what seems like, an endless amount of troubleshooting for this problem and have decided to uninstall both LTR 2.14.12 and 2.18.4. Merge worked initially in 2.14.12, but I was not able to reload my initial data to test for consistency. In 2.18.4 I was able to load my data with no problems but the merge function was receiving the "global name 'dataobjects' is not defined" error. From what I understand, 2.18.5 is releasing tomorrow (3/24/2017) and this bug will be fixed. I am currently reinstalling 2.14.12 to test for consistency once more. Also, @JuliaStrzyż and @Chansen, the SAGA merge vector layers seemed to work as well, if not, more flawlessly than MMQGIS. Just another option to add to your lists of work-arounds.