Transitioning from mesh.xml to mesh.xdmf, from dolfin-convert to meshio

Hi everyone,

i’m currently trying to import a complex mesh geometry in Fenics.
The original file is from the Nastran format .nas. I opened the file in gmsh and exported it as .msh file. So far, so good.
I can read the file succesfully using meshio.read and write it to one .xdmf file using meshio.write:

meshio.write("mesh.xdmf", meshio.Mesh(points=msh.points, cells={"tetra": msh.cells["tetra"]}))

But when i want to execute the second line

meshio.write("mf.xdmf", meshio.Mesh(points=msh.points, cells={"triangle": msh.cells["triangle"]},
                                    cell_data={"triangle": {"name_to_read": msh.cell_data["triangle"]["gmsh:physical"]}}))

i get the following error:

cells={"triangle": msh.cells["triangle"]},
KeyError: 'triangle'

I’m using Dolfin 2019.1.0 and used gmsh version 3.0.6, the mesh should be a 3D mesh.
I’m not quite sure if its possible to open a .nas file with gmsh and export it as .msh file.

Thanks in advance, i appreciate every little help i can get!