Hi, I get the following error when I try to run the ft11_magnetostatics.py example of the “Solving PDEs in Python -The FEniCS tutorial Part 1”. It happens with the default installation of FEniCS for Ubuntu as well as with the docker container. I have run the example in a Jupyter notebook and the error happens just after the declaration the Permeability class:
The error is the following:
Traceback (most recent call last):
File "ft11_magnetostatics.py", line 74, in <module>
mu = Permeability(markers, degree=1)
File "ft11_magnetostatics.py", line 65, in __init__
self.markers = markers
File "/usr/lib/python3/dist-packages/dolfin/function/expression.py", line 438, in __setattr__
elif name in self._parameters:
File "/usr/lib/python3/dist-packages/dolfin/function/expression.py", line 432, in __getattr__
return self._parameters[name]
File "/usr/lib/python3/dist-packages/dolfin/function/expression.py", line 432, in __getattr__
return self._parameters[name]
File "/usr/lib/python3/dist-packages/dolfin/function/expression.py", line 432, in __getattr__
return self._parameters[name]
[Previous line repeated 327 more times]
RecursionError: maximum recursion depth exceeded
Thank you very much for that. It is a year since you gave that answer, but still needed that. Lots of Fenics tutorials are out of date. Do you know who should I tell about that?
What exactly does this line do? super().__init__(**kwargs)
Note that the FEniCS-tutorial is a book by Hans-Petter Langtangen and Anders Logg, and comments about it being out of date should be addressed as described in my link:
# Comments and corrections
Comments and corrections can be reported as issues for the Git repository of the book or via email to logg@chalmers.se. Note that fixes will be incorporated directly into the PDF and HTML versions of the book accessible above, but will take a longer time to propagate to the Springer print and eBook versions.
The tutorial was created for FEniCS 2016.2.0, and since then alot of API changes has happened. However, FEniCS has a large variety of demos, that illustrate the newest syntax.
We are currently preparing a tutorial for the newest version of dolfin, dolfinx, which we hopefully will release before April next year.