As you mentioned I installed via spack with dolfinx@main. I followed the instructions here for the development version of multiphenicsx. I even tried explicitly making the second input into a list as multiphenicsx.fem.DofMapRestriction(V1.dofmap, list(dofs_V1_Omega1))
which gave the same error except now with
Invoked with types: multiphenicsx.fem.dofmap_restriction.DofMapRestriction, dolfinx.cpp.fem.DofMap, list
Nonetheless I uninstalled multiphenicsx and re-cloned a fresh multiphenicsx. I then re-installed as you suggested here, and it seems all is well. It seems the fact that I used different compilers to install dolfinx and multiphenicsx messed with the compatibility perhaps of dolfinx.cpp.fem.DofMap
.