Open cmarshak opened 4 years ago
@cmarshak I tried to reproduce the error but I couldn't. If you ran the requests on a Wednesday chances are that it was a maintenance issue. NSIDC does that every Wednesday morning and some services get degraded. The URL should be accessible from anywhere as long as you enter valid EarthData login credentials.
When I run the code through my JPL VPN, I do not have the issue. It's when I run the code through my home network.
Because I am downloading a lot of data, I am trying to avoid routing any requests through a VPN.
Thank you again for your help.
@cmarshak: I'm Lisa with NSIDC User Services. I'm working with our Data Operations and System Administrators to troubleshoot your issue. I'll let you know when I have more information.
Thank you! I am currently able to use a JPL server so I am not dealing with these problems.
As an aside, I have found that the session from the notebook are no longer working.
I had to replace session
objects with those I found from here.
Specifically:
class SessionWithHeaderRedirection(requests.Session):
AUTH_HOST = 'urs.earthdata.nasa.gov'
def __init__(self, username, password):
super().__init__()
self.auth = (username, password)
def rebuild_auth(self, prepared_request, response):
headers = prepared_request.headers
url = prepared_request.url
if 'Authorization' in headers:
original_parsed = requests.utils.urlparse(response.request.url)
redirect_parsed = requests.utils.urlparse(url)
if (original_parsed.hostname != redirect_parsed.hostname) and \
redirect_parsed.hostname != self.AUTH_HOST and \
original_parsed.hostname != self.AUTH_HOST:
del headers['Authorization']
return
@cmarshak I apologize for the delay in getting back to you. We appreciate that you brought the Earthdata code snippet to our attention and we’re looking into incorporating it.
To help us troubleshoot further, could you do the following:
For the notebook provided, I am currently getting the following error quite frequently and cannot easily make get requests:
I get this when running the cell:
Is this a maintenance issues? Or working remotely away from a NASA facility?
Hope you are all taking good care during these trying and scary times.