Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XAS KeyError: 'spacegroup_number' #1057

Open
superstar54 opened this issue Jan 10, 2025 · 0 comments
Open

XAS KeyError: 'spacegroup_number' #1057

superstar54 opened this issue Jan 10, 2025 · 0 comments
Assignees

Comments

@superstar54
Copy link
Member

In the AiiDAlab QE XAS calculaiton, I got this error:

/opt/conda/lib/python3.9/site-packages/aiida_quantumespresso/workflows/xspectra/crystal.py in validate_inputs(inputs, _)
    443 
    444         if 'symmetry_data' in inputs:
--> 445             spacegroup_number = inputs['symmetry_data']['spacegroup_number'].value
    446             equivalent_sites_data = inputs['symmetry_data']['equivalent_sites_data'].get_dict()
    447             if spacegroup_number <= 0 or spacegroup_number >= 231:

KeyError: 'spacegroup_number'

The reason is that in the AiiDAlab QE workflow, it assigns the XAS builder to the main app builder by:

setattr(builder, name, xas_plugin_builder)

in the xas_plugin_builder, the namespace symmetry_data could be empty, result in the error.

I think this is a common error source that the plugin's logic depend on whether a input exist or not, but not check if it is empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant