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

earthaccess.login() has lots of output #283

Closed
jrbourbeau opened this issue Aug 18, 2023 · 1 comment · Fixed by #300
Closed

earthaccess.login() has lots of output #283

jrbourbeau opened this issue Aug 18, 2023 · 1 comment · Fixed by #300

Comments

@jrbourbeau
Copy link
Collaborator

Running earthaccess.login() has the following output:

In [1]: import earthaccess

In [2]: earthaccess.login()
EARTHDATA_USERNAME and EARTHDATA_PASSWORD are not set in the current environment, try setting them or use a different strategy (netrc, interactive)
You're now authenticated with NASA Earthdata Login
Using token with expiration date: 10/01/2023
Using .netrc file for EDL
Out[2]: <earthaccess.auth.Auth at 0x10769cfd0>

I could be totally off, but this seems like a lot of information for a successful login. In particular the

EARTHDATA_USERNAME and EARTHDATA_PASSWORD are not set in the current environment, try setting them or use a different strategy (netrc, interactive)

could be possibly concerning for someone who's new to earthaccess. Maybe they see this message and think something went wrong.

I'm curious what folks here think about having less verbose output in this case like

In [1]: import earthaccess

In [2]: earthaccess.login()
You have successfully authenticated with NASA Earthdata
Out[2]: <earthaccess.auth.Auth at 0x10769cfd0>

or maybe even no output if the login is successful

This is a relatively minor issue, though one I thought was still worth raising.

@MattF-NSIDC
Copy link

no output if the login is successful

💯

The rest feels like it should be debug output! And the order seems kind of weird. "Using netrc" seems like it should have been printed before "Success".

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 a pull request may close this issue.

2 participants