Undefined (and other symbols) are not pickable.
The following IPython session shows the issue.
>>> from xotl.tools.symbols import Undefined
>>> import pickle
>>> pickle.loads(pickle.dumps(Undefined, pickle.HIGHEST_PROTOCOL))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-3-6291df6d2bb8> in <module>
----> 1 pickle.loads(pickle.dumps(Undefined, pickle.HIGHEST_PROTOCOL))
~/.local/lib/python3.7/site-packages/xotl/tools/symbols.py in __new__(cls, name, value)
179 See `~Symbol.__new__`:meth: for information about parameters.
180 '''
--> 181 return super().__new__(cls, name, bool(value))
182
183
~/.local/lib/python3.7/site-packages/xotl/tools/symbols.py in __new__(cls, name, value)
105 '''
106 from sys import intern as unique
--> 107 name = unique(name)
108 if name:
109 if value is None:
TypeError: intern() argument 1 must be str, not int
It was discovered while working on merchise/xoeuf!35.
I don't know if we should release fixes for 1.9.x and 2.0.x.