Calculate flux from solution with Fenicsx

I had already tried Where to find 'project'-function in dolfinx? - #2 by nate, but it crashes with the error AttributeError: FunctionSpace object has no attribute function_space.

And interpolation complains that RuntimeError: Cannot interpolate Expression with Argument
So I’ll keep looking.