How to make JSON serializable to finalize ase-neb calculations using siesta calculator?

I’ve got the following error when running ase-neb calculations using Siesta calculator:
" raise TypeError(f’Object of type {} ’
TypeError: Object of type object is not JSON serializable "

I realize that some extra keywords related to JSON should be added, but I am not familiar with that.
I would appreciate any comments/suggestions to solve this problem.

I use ASE/3.21.0, Python/3.8.3, siesta-v4.1.5 to perform NEB calculations. The code works well. The convergence criterium was, at least, satisfied:
BFGS: 27 20:20:19 -5222.188846 0.0593
Job completed
Job completed
Job completed
Job completed
Job completed
BFGS: 28 20:29:27 -5222.189053 0.0382
However, at final stage, the process was interrupted and no “neb.traj” file was created. From the analysis of the output, it is clear that the transition state was successfully identified.
The error appears after:
*view(images) *
write(‘neb.traj’, images)

My file is below:
from ase.visualize import view
from import write
from ase import io
from ase.neb import NEB
from ase.optimize import QuasiNewton, BFGS
*from ase.units import **
from ase.calculators.siesta import Siesta
# Read initial and final states:

initial =‘HHFSGinitial.XSF’)
final =‘HHFSGfinal.XSF’)
# Make a band consisting of 5 images:

view([initial, final])

images = [initial]
for i in range(5):

  • images.append(initial.copy())*

for image in images:

  • image.calc = Siesta(label=‘Tafel’,*
  •          xc='PBE',*
  •          mesh_cutoff=200 * Ry,*
  •          energy_shift=0.01 * Ry,*
  •          basis_set='DZP',*
  •          kpts=[3, 3, 1],*
  •          fdf_arguments={'DM.MixingWeight': 0.05,*
  •                         'MaxSCFIterations': 600},*
  •          )*


neb = NEB(images, climb=True)

optimizer = BFGS(neb)
*view(images) *
write(‘neb.traj’, images)