I cannot reproduce your error message. What version of DOLFINx are you running?
The only place I get an error is at outputting:
Traceback (most recent call last):
File "/root/shared/ping.py", line 88, in <module>
xx.write_function(Et)
File "/usr/local/dolfinx-complex/lib/python3.10/dist-packages/dolfinx/io/utils.py", line 235, in write_function
super().write_function(getattr(u, "_cpp_object", u), t, mesh_xpath)
RuntimeError: Degree of output Function must be same as mesh degree. Maybe the Function needs to be interpolated?
which is described in TypeError: BoundingBoxTree.__init__() takes 2 positional arguments but 3 were given - #4 by dokken