__getitem__ for Trajectory gives: TypeError: FixedPlane.__init__() got an unexpected keyword argument 'a'
Checklist
-
The issue remains in the development version of ASE. -
An minimal example is provided to reproduce the issue.
Summary
Discovered by Alvin Noe Ladines and Ahmed Ilyas
It works in 3.22.0 and broken in 3.25.0 and current dev version.
from ase.io.trajectory import Trajectory
_ = Trajectory('moldyn1.traj')[0]
Gives:
Traceback (most recent call last):
File "/Users/yang/developer/temp/test.py", line 3, in <module>
_ = Trajectory('moldyn1.traj')[0]
File "/Users/yang/developer/temp/.venv/lib/python3.10/site-packages/ase/io/trajectory.py", line 280, in __getitem__
atoms = read_atoms(b, traj=self)
File "/Users/yang/developer/temp/.venv/lib/python3.10/site-packages/ase/io/trajectory.py", line 361, in read_atoms
return read_atoms(backend, header, traj, False)
File "/Users/yang/developer/temp/.venv/lib/python3.10/site-packages/ase/io/trajectory.py", line 387, in read_atoms
constraint=[dict2constraint(d)
File "/Users/yang/developer/temp/.venv/lib/python3.10/site-packages/ase/io/trajectory.py", line 387, in <listcomp>
constraint=[dict2constraint(d)
File "/Users/yang/developer/temp/.venv/lib/python3.10/site-packages/ase/constraints.py", line 46, in dict2constraint
return globals()[dct['name']](**dct['kwargs'])
TypeError: FixedPlane.__init__() got an unexpected keyword argument 'a'
Edited by Haoyu (Daniel) Yang