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

Hello!
I’ve got the following error when running ase-neb calculations using Siesta calculator:
" raise TypeError(f’Object of type {o.class.name} ’
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 new.py file is below:
from ase.visualize import view
from ase.io import write
from ase import io
from ase.neb import NEB
import ase.io.xsf
from ase.optimize import QuasiNewton, BFGS
*from ase.units import **
from ase.calculators.siesta import Siesta
# Read initial and final states:

initial = ase.io.read(‘HHFSGinitial.XSF’)
final = ase.io.read(‘HHFSGfinal.XSF’)
# Make a band consisting of 5 images:
#numimages=5

view([initial, final])

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

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

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},*
    
  •          )*
    

QuasiNewton(initial).run(fmax=0.05)
QuasiNewton(final).run(fmax=0.05)

neb = NEB(images, climb=True)
neb.interpolate()

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