PhasesResearchLab/ESPEI

AttributeError: 'NoneType' object has no attribute 'values'

HaihuiZhang opened this issue · 4 comments

Dear Administrator,
An 'AttributeError' occurred when I run 'espei --input espei-in-2.yaml' using the latest development version of ESPEI. Would you mind help me to check my dataset? Thanks.
errorprint-log.txt
verbosity-log.txt
CO-CU-20201104.zip

f:\users\zhang\pycalphad\pycalphad\codegen\callables.py:97: UserWarning: State variables in build_callables are not {N, P, T}, but {T, P}. This can lead to incorrectly calculated values if the state variables used to call the generated functions do not match the state variables used to create them. State variables can be added with the additional_statevars argument.
"additional_statevars argument.".format(state_variables))
Traceback (most recent call last):
File "F:\Users\zhang\Anaconda32020\envs\espei2020test\Scripts\espei-script.py", line 33, in
sys.exit(load_entry_point('espei', 'console_scripts', 'espei')())
File "f:\users\zhang\espei\espei\espei_script.py", line 311, in main
run_espei(input_settings)
File "f:\users\zhang\espei\espei\espei_script.py", line 260, in run_espei
approximate_equilibrium=approximate_equilibrium,
File "f:\users\zhang\espei\espei\optimizers\opt_base.py", line 36, in fit
node = self.fit(symbols, datasets, *args, **kwargs)
File "f:\users\zhang\espei\espei\optimizers\opt_mcmc.py", line 238, in fit
self.predict(initial_guess, **ctx)
File "f:\users\zhang\espei\espei\optimizers\opt_mcmc.py", line 289, in predict
multi_phase_error = calculate_zpf_error(parameters=np.array(params), **zpf_kwargs)
File "f:\users\zhang\espei\espei\error_functions\zpf_error.py", line 315, in calculate_zpf_error
target_hyperplane = estimate_hyperplane(phase_region, parameters, approximate_equilibrium=approximate_equilibrium)
File "f:\users\zhang\espei\espei\error_functions\zpf_error.py", line 186, in estimate_hyperplane
grid = calculate
(dbf, species, phases, str_statevar_dict, models, phase_records, pdens=500, fake_points=True)
File "f:\users\zhang\espei\espei\shadow_functions.py", line 55, in calculate

largest_energy=float(1e10), fake_points=fp)
File "f:\users\zhang\pycalphad\pycalphad\core\calculate.py", line 190, in _compute_phase_values
param_symbols, parameter_array = extract_parameters(parameters)
File "f:\users\zhang\pycalphad\pycalphad\core\utils.py", line 361, in extract_parameters
parameter_array_lengths = set(np.atleast_1d(val).size for val in parameters.values())
AttributeError: 'NoneType' object has no attribute 'values'

My pycalphad also used the latest development version.

At the same time, I use the latest development version to run the successful case that I ran before using espei = 0.7.2, pycalphad = 0.8 also reported an error called KeyError: 'BLANK'. So maybe there is a problem with the latest version.

This should be fixed #133