5

I'm trying to merge contour line shapefiles but I keep encountering errors when doing so. I'm using Vector > Data Management Tools > Merge and selecting all six line shapefiles and given the error 'global name 'dataobjects' is not defined'.

I have also installed the MMQGIS plugin to try an alternative but receive a python error as soon as I click MMQGIS > Combine > Merge Layers...

Traceback (most recent call last): File "C:/Users/me/.qgis2/python/plugins\mmqgis\mmqgis_menu.py", line 316, in merge dialog = mmqgis_merge_dialog(self.iface) File "C:/Users/me/.qgis2/python/plugins\mmqgis\mmqgis_dialogs.py", line 1714, in init mmqgis_load_combo_box_with_vector_layers(self.iface, self.sourcelayers, True) File "C:/Users/me/.qgis2/python/plugins\mmqgis\mmqgis_dialogs.py", line 2610, in mmqgis_load_combo_box_with_vector_layers combo_index = combo_box.findText(layer.name()) AttributeError: 'QListWidget' object has no attribute 'findText'

I've set the CRS to OSGB 1936 / British National Grid for all layers and the project CRS in the same.

The shapefiles are found here: https://www.dropbox.com/sh/w5zg5b8otfz2e3c/AADoACxzlBW789O3u2-8SgC9a?dl=0

nmtoken
13.6k5 gold badges39 silver badges91 bronze badges
asked Mar 31, 2017 at 13:18

2 Answers 2

4

This is a bug in QGIS 2.18.4. Update to 2.18.5.

answered Mar 31, 2017 at 13:43
3

I think there's something wrong with the prj files you have because although they mention "British_National_Grid", my QGIS just loads a user-generated CRS.

So you could try re-saving your layers (right-click your layer then go to Save As...) with the relevant CRS again.

Or you could use SAGA's Merge vector layers tool:

Processing Toolbox > SAGA > Vector general tools > Merge vector layers

Result

answered Mar 31, 2017 at 13:33
3
  • No joy by saving the files under British National Grid. Tried doing it with SAGA but still getting the same error. Referring to Matthias' answer below, what version are you on? I'm still on 2.18.4 Commented Apr 3, 2017 at 11:42
  • @JamesB - Yes, could be a version issue then as I used QGIS 2.18.2 :) Commented Apr 3, 2017 at 11:44
  • The SAGA Merge vector layers tool indeed works perfectly for me as until now I am stuck with 2.18.4. Commented Apr 29, 2018 at 12:24

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.