-
Notifications
You must be signed in to change notification settings - Fork 5
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
Unrecognized facet name requires adding the facet manually to selection.py #3
Comments
I think I encountered a similar issue following the search page of the documentation. Following the documentation, I wanted to query based on the
Yet, building the query leads to a key error:
Full traceback(py310) [angevaar@pc160101 joran]$ less /data/ssd/joran/esgpull/log/esgpull-search-2023-05-04_07-17-47.log
[2023-05-04 09:17:47] DEBUG root
Locals:
{'self': Selection(frequency='mon', institution_id='IPSL', project='CMIP6', variable_id='tas'), 'name': 'version', 'value': ['20220722']}
[2023-05-04 09:17:47] ERROR root
Traceback (most recent call last):
File "/usr/people/angevaar/miniconda3/envs/py310/lib/python3.10/site-packages/esgpull/tui.py", line 154, in logging
yield
File "/usr/people/angevaar/miniconda3/envs/py310/lib/python3.10/site-packages/esgpull/cli/search.py", line 69, in search
query = parse_query(
File "/usr/people/angevaar/miniconda3/envs/py310/lib/python3.10/site-packages/esgpull/cli/utils.py", line 175, in parse_query
selection = parse_facets(facets)
File "/usr/people/angevaar/miniconda3/envs/py310/lib/python3.10/site-packages/esgpull/cli/utils.py", line 155, in parse_facets
selection[name] = values
File "/usr/people/angevaar/miniconda3/envs/py310/lib/python3.10/site-packages/esgpull/models/selection.py", line 116, in __setitem__
raise KeyError(name)
KeyError: 'version' Build info
|
Sorry, I just realized I forgot to enable notifications on this repo, since it was moved to the ESGF organization. Currently, the list of facet keys that can be used in a Query is hard-coded in this file: The For facet values, there is no such hard constraint. I relaxed it after realizing it prevented using some of esgpull's search features inside an saved Query (i.e. wildcard syntax). As it seems a recurring issue, we should definitely improve this validation, and I can think of a few ways:
In the meantime, there is a workaround that concerns |
The text was updated successfully, but these errors were encountered: