Cannot create 1d mesh

A facet is a vertex when you work on a 1D mesh.

There are many posts on the forum on this topic.
For instance by searching for “triangle_mesh”, you get: Error defining surface and measures for a 3D mesh imported from Gmsh - #4 by dokken
which explains how facet markers should be stored.