Asarray_chkfinite raise ValueError( ValueError: array must not contain infs or NaNs ERROR:amset:

Hii Alex,
I am trying to plot band structure and then want to get the effective mass using “amset plot band vasprun.xml --plot-dos --stats”. But I am getting the below error:
Using nonparabolic fitting of the band edges

Hole effective masses:
invalid value encountered in sqrt

ERROR: amset exiting on 24 Jan 2023 at 21:44

Traceback (most recent call last):
File “/home/kcbhamu/bin/amset”, line 10, in
sys.exit(cli())
File “/home/kcbhamu/lib/python3.9/site-
packages/click/core.py”, line 1130, in call
return self.main(*args, **kwargs)
File “/home/kcbhamu/lib/python3.9/site-
packages/click/core.py”, line 1055, in main
rv = self.invoke(ctx)
File “/home/kcbhamu/lib/python3.9/site-
packages/click/core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/kcbhamu/lib/python3.9/site-
packages/click/core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/kcbhamu/lib/python3.9/site-
packages/click/core.py”, line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/kcbhamu/lib/python3.9/site-
packages/click/core.py”, line 760, in invoke
return __callback(*args, **kwargs)
File “/home/kcbhamu/lib/python3.9/site-
packages/amset/tools/plot.py”, line 267, in band
_log_band_stats(bs_plotter._bs[0])
File “/home/kcbhamu/lib/python3.9/site-
packages/amset/tools/plot.py”, line 826, in _log_band_stats
eff_mass = fit_effective_mass(
File “/home/kcbhamu/lib/python3.9/site-
packages/sumo/electronic_structure/effective_mass.py”, line 152, in
fit_effective_mass
popt, _ = curve_fit(f, distances, energies, p0=[1.0, 1.0],
bounds=bounds)
File “/home/kcbhamu/lib/python3.9/site-
packages/scipy/optimize/_minpack_py.py”, line 811, in curve_fit
_, s, VT = svd(res.jac, full_matrices=False)
File “/home/kcbhamu/lib/python3.9/site-
packages/scipy/linalg/_decomp_svd.py”, line 108, in svd
a1 = _asarray_validated(a, check_finite=check_finite)
File “/home/kcbhamu/lib/python3.9/site-
packages/scipy/_lib/_util.py”, line 287, in _asarray_validated
a = toarray(a)
File “/home/kcbhamu/lib/python3.9/site-
packages/numpy/lib/function_base.py”, line 603, in
asarray_chkfinite
raise ValueError(
ValueError: array must not contain infs or NaNs
ERROR:amset:
ERROR: amset exiting on 24 Jan 2023 at 21:44
Traceback (most recent call last):
File “/home/kcbhamu/bin/amset”, line 10, in
sys.exit(cli())
File “/home/kcbhamu/lib/python3.9/site-packages/click/core.py”, line 1130, in call
return self.main(*args, **kwargs)
File “/home/kcbhamu/lib/python3.9/site-packages/click/core.py”, line 1055, in main
rv = self.invoke(ctx)
File “/home/kcbhamu/lib/python3.9/site-packages/click/core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/kcbhamu/lib/python3.9/site-packages/click/core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/kcbhamu/lib/python3.9/site-packages/click/core.py”, line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/kcbhamu/lib/python3.9/site-packages/click/core.py”, line 760, in invoke
return __callback(*args, **kwargs)
File “/home/kcbhamu/lib/python3.9/site-packages/amset/tools/plot.py”, line 267, in band
_log_band_stats(bs_plotter._bs[0])
File “/home/kcbhamu/lib/python3.9/site-packages/amset/tools/plot.py”, line 826, in _log_band_stats
eff_mass = fit_effective_mass(
File “/home/kcbhamu/lib/python3.9/site-packages/sumo/electronic_structure/effective_mass.py”, line 152, in fit_effective_mass
popt, _ = curve_fit(f, distances, energies, p0=[1.0, 1.0], bounds=bounds)
File “/home/kcbhamu/lib/python3.9/site-packages/scipy/optimize/_minpack_py.py”, line 811, in curve_fit
_, s, VT = svd(res.jac, full_matrices=False)
File “/home/kcbhamu/lib/python3.9/site-packages/scipy/linalg/_decomp_svd.py”, line 108, in svd
a1 = _asarray_validated(a, check_finite=check_finite)
File “/home/kcbhamu/lib/python3.9/site-packages/scipy/_lib/_util.py”, line 287, in _asarray_validated
a = toarray(a)
File “/home/kcbhamu//lib/python3.9/site-packages/numpy/lib/function_base.py”, line 603, in asarray_chkfinite
raise ValueError(
ValueError: array must not contain infs or NaNs

How can I get rid of this error?