Python script DAACDataDownload authentication isse
Python script DAACDataDownload authentication isse
response.status_code=401
Error message: Verify that your username and password are correct in C:\Users\fernando.carneiro/.netrc
I already verified my username and password and both are working fine for the link that I am trying to download the file.
It is popping this warning as well, which I have no idea if it is related with the authentication issue
Warning: InsecureRequestWarning: Unverified HTTPS request is being made to host 'urs.earthdata.nasa.gov'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
Error message: Verify that your username and password are correct in C:\Users\fernando.carneiro/.netrc
I already verified my username and password and both are working fine for the link that I am trying to download the file.
It is popping this warning as well, which I have no idea if it is related with the authentication issue
Warning: InsecureRequestWarning: Unverified HTTPS request is being made to host 'urs.earthdata.nasa.gov'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
Tags:
-
- Subject Matter Expert
- Posts: 16
- Joined: Tue Mar 14, 2023 1:41 pm America/New_York
Re: Python script DAACDataDownload authentication isse
HI,
Please make sure that your local netrc file is configured following these instructions: https://github.com/podaac/data-subscriber#step-2-setup-your-earthdata-login
I think your issue is the filename. Try '_netrc' instead if you're on Windows.
Thanks,
Jack @ PODAAC
Please make sure that your local netrc file is configured following these instructions: https://github.com/podaac/data-subscriber#step-2-setup-your-earthdata-login
I think your issue is the filename. Try '_netrc' instead if you're on Windows.
Thanks,
Jack @ PODAAC
Re: Python script DAACDataDownload authentication isse
You are right I am using windows, but I am still getting the same error when I rename .netrc to _netrc
When I print(netrc(netrcDir).authenticators(urs)[0]) and print(netrc(netrcDir).authenticators(urs)[2]) information matches with my username and password
URL example: https://opendap.earthdata.nasa.gov/providers/POCLOUD/collections/ECCO%20Atmosphere%20Surface%20Temperature%2C%20Humidity%2C%20Wind%2C%20and%20Pressure%20-%20Daily%20Mean%200.5%20Degree%20(Version%204%20Release%204)/granules/ATM_SURFACE_TEMP_HUM_WIND_PRES_day_mean_2000-03-17_ECCO_V4r4_latlon_0p50deg.ascii
Warning and Error message:
C:\Users\fernando.carneiro\Documents\python_env\data_download\lib\site-packages\urllib3\connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host 'urs.earthdata.nasa.gov'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
ATM_SURFACE_TEMP_HUM_WIND_PRES_day_mean_2000-03-18_ECCO_V4r4_latlon_0p50deg.ascii not downloaded. Verify that your username and password are correct in C:\Users\fernando.carneiro/_netrc
When I print(netrc(netrcDir).authenticators(urs)[0]) and print(netrc(netrcDir).authenticators(urs)[2]) information matches with my username and password
URL example: https://opendap.earthdata.nasa.gov/providers/POCLOUD/collections/ECCO%20Atmosphere%20Surface%20Temperature%2C%20Humidity%2C%20Wind%2C%20and%20Pressure%20-%20Daily%20Mean%200.5%20Degree%20(Version%204%20Release%204)/granules/ATM_SURFACE_TEMP_HUM_WIND_PRES_day_mean_2000-03-17_ECCO_V4r4_latlon_0p50deg.ascii
Warning and Error message:
C:\Users\fernando.carneiro\Documents\python_env\data_download\lib\site-packages\urllib3\connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host 'urs.earthdata.nasa.gov'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
ATM_SURFACE_TEMP_HUM_WIND_PRES_day_mean_2000-03-18_ECCO_V4r4_latlon_0p50deg.ascii not downloaded. Verify that your username and password are correct in C:\Users\fernando.carneiro/_netrc
-
- Subject Matter Expert
- Posts: 16
- Joined: Tue Mar 14, 2023 1:41 pm America/New_York
Re: Python script DAACDataDownload authentication isse
Hi again,
Sorry, I did not realize that you are using OPeNDAP. There may be additional steps required.
First, can you please point me to the script you are running? Is it on github?
Thanks for your patience,
Jack
Sorry, I did not realize that you are using OPeNDAP. There may be additional steps required.
First, can you please point me to the script you are running? Is it on github?
Thanks for your patience,
Jack
Re: Python script DAACDataDownload authentication isse
Hi Jack,
First of all, thanks for your support very much appreciated.
Here is the script location that I am using https://git.earthdata.nasa.gov/projects/LPDUR/repos/daac_data_download_python/browse/DAACDataDownload.py
Let me know if you need any additional information.
Fernando
First of all, thanks for your support very much appreciated.
Here is the script location that I am using https://git.earthdata.nasa.gov/projects/LPDUR/repos/daac_data_download_python/browse/DAACDataDownload.py
Let me know if you need any additional information.
Fernando