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

Update example in search_datasets #247

Merged
merged 1 commit into from
Jun 13, 2023
Merged

Conversation

jrbourbeau
Copy link
Collaborator

Copy and pasting this example as is gives me the following error:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[50], line 1
----> 1 datasets = earthaccess.search_datasets(
      2     keywords="sea surface anomaly",
      3     cloud_hosted=True
      4 )

File ~/mambaforge/envs/earthaccess/lib/python3.9/site-packages/earthaccess/api.py:57, in search_datasets(count, **kwargs)
     53     print(
     54         "Warning: a valid set of parameters is needed to search for datasets on CMR"
     55     )
     56     return []
---> 57 query = DataCollections().parameters(**kwargs)
     58 datasets_found = query.hits()
     59 print(f"Datasets found: {datasets_found}")

File ~/mambaforge/envs/earthaccess/lib/python3.9/site-packages/earthaccess/search.py:129, in DataCollections.parameters(self, **kwargs)
    126 for key, val in kwargs.items():
    127     # verify the key matches one of our methods
    128     if key not in methods:
--> 129         raise ValueError("Unknown key {}".format(key))
    131     # call the method
    132     if isinstance(val, tuple):

ValueError: Unknown key keywords

My guess is this should be keyword instead of keywords (which works locally for me)

@github-actions
Copy link

github-actions bot commented Jun 5, 2023

Binder 👈 Launch a binder notebook on this branch for commit 3081162

I will automatically update this comment whenever this PR is modified

@betolink betolink merged commit 86bd776 into nsidc:main Jun 13, 2023
@jrbourbeau jrbourbeau deleted the keyword-typo branch June 13, 2023 17:20
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

Successfully merging this pull request may close these issues.

2 participants