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

Empty endpoints raise errors on validation #622

Closed
ml-evs opened this issue Dec 4, 2020 · 0 comments · Fixed by #621
Closed

Empty endpoints raise errors on validation #622

ml-evs opened this issue Dec 4, 2020 · 0 comments · Fixed by #621
Assignees
Labels
validator Related to the OPTIMADE validator

Comments

@ml-evs
Copy link
Member

ml-evs commented Dec 4, 2020

As an example optimade-validator https://aiida-dev.materialscloud.org/tc-applicability/optimade -vv ends up reporting two failures:

FAILURES
========

https://aiida-dev.materialscloud.org/tc-applicability/optimade - _recurse_through_endpoint - failed with error
	ResponseError: Unable to generate filters for endpoint structures: no valid entries found.
	Traceback (most recent call last):
	  File "/home/mevans/src/optimade/optimade-python-tools/optimade/validator/utils.py", line 300, in wrapper
	    raise exc
	  File "/home/mevans/src/optimade/optimade-python-tools/optimade/validator/utils.py", line 290, in wrapper
	    result, msg = test_fn(validator, *args, **kwargs)
	  File "/home/mevans/src/optimade/optimade-python-tools/optimade/validator/validator.py", line 350, in _recurse_through_endpoint
	    f"Unable to generate filters for endpoint {endp}: no valid entries found."
	optimade.validator.utils.ResponseError: Unable to generate filters for endpoint structures: no valid entries found.
	
https://aiida-dev.materialscloud.org/tc-applicability/optimade/structures?page_limit=5&response_fields=chemical_formula_descriptive,chemical_formula_hill,elements_ratios,species,chemical_formula_reduced,cartesian_site_positions,assemblies,nelements,chemical_formula_anonymous,immutable_id,structure_features,elements,nsites,species_at_sites,lattice_vectors,dimension_types,nperiodic_dimensions,last_modified - _get_single_id_from_multi_entry_endpoint - failed with error
	ResponseError: No entries found under endpoint to scrape ID from. This may be caused by previous errors, if e.g. the endpoint failed deserialization.
	Traceback (most recent call last):
	  File "/home/mevans/src/optimade/optimade-python-tools/optimade/validator/utils.py", line 300, in wrapper
	    raise exc
	  File "/home/mevans/src/optimade/optimade-python-tools/optimade/validator/utils.py", line 290, in wrapper
	    result, msg = test_fn(validator, *args, **kwargs)
	  File "/home/mevans/src/optimade/optimade-python-tools/optimade/validator/validator.py", line 1087, in _get_single_id_from_multi_entry_endpoint
	    "No entries found under endpoint to scrape ID from. "
	optimade.validator.utils.ResponseError: No entries found under endpoint to scrape ID from. This may be caused by previous errors, if e.g. the endpoint failed deserialization.

These should be replaced by warnings.

@ml-evs ml-evs added the validator Related to the OPTIMADE validator label Dec 4, 2020
@ml-evs ml-evs self-assigned this Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validator Related to the OPTIMADE validator
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant