-
Notifications
You must be signed in to change notification settings - Fork 90
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
[BUG] No warning for incorrect login #888
Comments
@mdtanker Thank you for reporting this. I'm surprised by this behavior and agree this should be throwing an error. I did a very quick test running python on my Mac terminal and this was returned when I entered an invalid username and password:
|
If you'd like to co-work or chat, we have a bi-weekly hack day coming up tomorrow: https://earthaccess.readthedocs.io/en/latest/contributing/our-meet-ups/ Ping me your email on linkedin if you'd like a calendar invite! |
@mfisher87 could you send the invite? I just messaged you on Linkedin, thanks! |
Hey Matt, just saw your message now; sent the zoom and calendar invite! The meeting is 30 minutes in, but all are welcome to drop in and drop out. Someone will be in the lobby to greet you! 1.5 hours remaining :) |
After a little digging I think this is a logger.info(
f"Authentication with Earthdata Login failed with:\n{token_resp.text}"
) Happy to fix this in a PR. Is there a reason an error is not raised (instead of just a logged message) when authentication fails? Is it because you want |
earthaccess will try multiple strategies, but it seems to me that it's unintentional that it would continue after an actual login failure. After finding no stored credentials, it makes sense to continue and try another strategy. But if a login fails, that needs to be fixed and earthaccess should, IMO, exit with an error. I think it would be useful to write a flowchart of earthaccess' intended login behavior when a strategy isn't specified, including when credentials are rejected and when credentials are not found. That can flesh out this doc page: https://earthaccess.readthedocs.io/en/latest/user_guide/authenticate/ This doc page (https://earthaccess.readthedocs.io/en/latest/howto/authenticate/) does document:
But I think we could be more specific with a flowchart in addition to a more detailed text description. |
cc @betolink ☝️ |
Sorry I'm just looking at this (I'm at AGU all week). Agree with @mfisher87 if none of the strategies work we should throw an exception. Maybe this can be another item for tomorrow's hack day https://lu.ma/8mj6f3qn?tk=X2HwYD A little tangential, we used to print some of these things instead of logging them, would it be useful to bring some |
Will there be a zoom? |
Great question, I think this one will be mostly in-person, is that right @maxrjones? |
Yes, I'm sorry that it's in-person only because the space isn't set up to support virtual participation well. |
Understood, thanks for considering :) |
Is this issue already tracked somewhere, or is this a new report?
Current Behavior
Thanks for the work with
earthaccess
! I've been using it for a while with no issues, however, I'm setting up a new computer, and I noticed when I useand I'm prompted for my username and password, if I enter an incorrect value, I don't receive any error messages. I would expect an error for logging in failed. This seems to happen for both
interactive
andenvironment
strategies, I haven't tried with thenetrc
strategy.Expected Behavior
When logging in fails in
earthaccess.login()
, an error message is raised telling the users the login failed.Steps To Reproduce
-> manually type in username and password
Environment
Additional Context
I'm happy to try and open a PR if this is something you want implemented.
The text was updated successfully, but these errors were encountered: