Without a full grid, it is impossible to reproduce the error or help you.
Please consider using meshio as a Python package, and consider: Cannot read facetag when converting .bdf file genarted from hypermesh to xdmf - #22 by dokken for inspiration as to how to use meshio from Python.