Yes, I just created a new "untitled.ipynb" on my Jupyter notebook.
Could it be this is specific to Jupyter, ".ipynb" files, cdb 2.4.5.2 or Ubuntu 22.04?
The snippet I used is
from cdb.core.component import *
{x, y, z}::Coordinate.
{i, j}::Indices(values={x, y, z}, position=fixed).
ex := a_{i}a_{j};
evaluate(ex, $a_{x} = k, a_{y} = l, a_{z} = m$)
substitute(ex, $k m -> 0$);
remove_zero_components(ex);
and the full details of the error are
Traceback (most recent call last):
File "/usr/lib/python3.10/dist-packages/cadabra2_jupyter/kernel.py", line 56, in do_execute
self._execute_python(pycode)
File "/usr/lib/python3.10/dist-packages/cadabra2_jupyter/kernel.py", line 110, in _execute_python
self._sandbox_context(pycode)
File "/usr/lib/python3.10/dist-packages/cadabra2_jupyter/context.py", line 51, in __call__
exec(code, self._sandbox)
File "<string>", line 8, in <module>
File "/home/gpn/.config/cadabra_packages/cdb/core/component.py", line 66, in remove_zero_components
if get_lhs(node).head() == r'\comma':
File "/home/gpn/.config/cadabra_packages/cdb/core/manip.py", line 50, in get_lhs
if n_args(ex.top()) != 2:
AttributeError: 'cadabra2.ExNode' object has no attribute 'top'
Many thanks
GPN