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

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.echo.nasa.gov', port=443): Max retries excee #21

Open
zhishuaixuexi opened this issue Apr 19, 2023 · 1 comment

Comments

@zhishuaixuexi
Copy link

zhishuaixuexi commented Apr 19, 2023

1、Using the 'modis atm' project“ https://github.com/DHI-GRAS/earthdata_download/archive/v0.7.zip ”, always unable to connect to api.echo.nasa.gov, and unable to open web pages at this address.

error:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.echo.nasa.gov', port=443): Max retries exceeded with url: /catalog-rest/echo_catalog/granules.js
on?page_num=1&page_size=2000&short_name=MOD05_L2&temporal%5B%5D=2016-01-01T00:00:00,2016-01-02T23:59:59&bounding_box=10,54,13,56 (Caused by NewConnectionError('<urllib3.connec
tion.HTTPSConnection object at 0x000001655F37F128>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))

2、Use the latest version of earthdata_ Download with the following error:
AttributeError: module 'earthdata_download.query' has no attribute 'find_data_entries'

3、Then, I switched back to the "earthdata_downloadxx-0.7. zip" version and modified the configuration. The new issue with the "NASA-ECHOURL_BASE = 'https://cmr.earthdata.nasa.gov/search/granules.json'
" address in the download is as follows:

error:
FAILED tests/test_overpass_filter.py::test_get_best_overpass - json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
FAILED tests/test_query.py::test_retrieve_entries - json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
FAILED tests/test_query.py::test_retrieve_entries_for_param - json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@j08lue
Copy link
Contributor

j08lue commented Apr 19, 2023

Are you able to use the latest version of earthdata_download instead of 0.7.0?

I can confirm that the latest version (1.2.0) works as expected, for example in this minimal query:

import datetime

from earthdata_download.api import EarthdataAPI

api = EarthdataAPI('<username>', '<password>')

results = api.query(
    short_name='MOD05_L2', 
    start_date=datetime.datetime(2023, 4, 1), 
)

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

No branches or pull requests

2 participants