Function evaluation tutorial fails on mac m3, fenicsx 0.9

On mac M3 running fenicsx 0.9 conda environment, I get the following error on running the function evaluation tutorial. I downloaded it as a python file expressions.py.

(fenicsx-0.9) (Mac: learn) 1097. python expressions.py 
Traceback (most recent call last):
  File "/Users/deboyce/Research/fenicsX/run/learn/expressions.py", line 128, in <module>
    print(f"{potential_colliding_cells._cpp_object=}")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dolfinx.cpp.graph.AdjacencyList_int32' object has no attribute '_cpp_object'

For some strange reason (probably limited amount of spare time), I never made a 0.9 release of the fenics-workshop notes.
There are a few minor things to change in that code to make it work on 0.9.
Change to the following:

print(f"{potential_colliding_cells=}")
print(f"{colliding_cells=}")
grad_expr = dolfinx.fem.Expression(grad_q, P.element.interpolation_points())
coordinates = facet_x.eval(mesh, cell_facet_pairs.flatten())
flux_values = heat_flux_expr.eval(mesh, cell_facet_pairs.flatten()

Thanks. That works now.

And for reference, I got what I needed. I was trying to compute integrals of the differences of two solutions on different meshes. It seems to be working now. It was straightforward enough: from a fenicsx function on one mesh, create a python function for interpolation, then use that on any other mesh.

You can also use interpolate_nonmatching;
https://docs.fenicsproject.org/dolfinx/v0.9.0/python/generated/dolfinx.fem.html#dolfinx.fem.Function.interpolate_nonmatching
which is quicker and works in parallel.

See for instance

and subsequent lines