ASE convesion of Trajectory file to XDATCAR

The issue here is while converting a TRAJ file to POSCAR, it works. But, for TRAJ to XDATCAR, it shows

TypeError: images should be a sequence of Atoms objects

. (Check below to see the error report)

import ase
from import read, write
from import write_vasp_xdatcar

bec ="./run10/local_minima.traj")
bec_new_pos ="local_minima_new.poscar", bec, vasp5=True)
bec_new_xdat ="local_minima_new.xdatcar", bec, label=None)