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

Restricted datasets can't be used with the API notation #438

Closed
betolink opened this issue Jan 26, 2024 · 0 comments · Fixed by #443 or #472
Closed

Restricted datasets can't be used with the API notation #438

betolink opened this issue Jan 26, 2024 · 0 comments · Fixed by #443 or #472
Assignees
Labels
type: bug Something isn't working

Comments

@betolink
Copy link
Member

If we want to search for a dataset that's not publicly available

import earthaccess

auth = earthaccess.login()
results = earthaccess.search_datasets(
  short_name="RESTRICTED_DATA"
)

will always return zero, even though our user has the proper access permission. I think the reason is because we are not passing the authenticated session to hits() here:

def hits(self) -> int:

A fix would be to implement the method using the auth session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
Status: Done
2 participants