It seems that when trying to use the TemperatureFromXDMF class in combination with using chemical potential such as in the following script, seems to fail using festim 1.0.0 in a conda environment of fenics, but passes within a docker environment. I can make an accompanying issue on the repo too.
Traceback (most recent call last):
File "/home/jdark/repos/FESTIM-review/gallery/breeding_blanket/mwe.py", line 41, in <module>
my_model.initialise()
File "/home/jdark/anaconda3/envs/festim-env/lib/python3.11/site-packages/festim/generic_simulation.py", line 255, in initialise
if self.T.is_steady_state():
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jdark/anaconda3/envs/festim-env/lib/python3.11/site-packages/festim/temperature/temperature.py", line 54, in is_steady_state
return "t" not in sp.printing.ccode(self.value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jdark/anaconda3/envs/festim-env/lib/python3.11/site-packages/sympy/printing/codeprinter.py", line 741, in ccode
return c_code_printers[standard.lower()](settings).doprint(expr, assign_to)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jdark/anaconda3/envs/festim-env/lib/python3.11/site-packages/sympy/printing/codeprinter.py", line 155, in doprint
expr = self._handle_UnevaluatedExpr(expr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jdark/anaconda3/envs/festim-env/lib/python3.11/site-packages/sympy/printing/codeprinter.py", line 115, in _handle_UnevaluatedExpr
return expr.replace(re, lambda arg: arg if isinstance(
^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'replace'
The version of festim in both cases was 1.0.0.
It seems from investigation this error is a result of the version of sympy within the docker container (1.1.1) vs that which is in the conda env (1.11.0). Specifically, changes to how the function sp.printing.ccode() operates.