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 ase.io import read, write
from ase.io.vasp import write_vasp_xdatcar

bec = ase.io.read("./run10/local_minima.traj")
bec_new_pos = ase.io.vasp.write_vasp("local_minima_new.poscar", bec, vasp5=True)
bec_new_xdat = ase.io.vasp.write_vasp_xdatcar("local_minima_new.xdatcar", bec, label=None)