Re: [python-users] SSL errors in trying to access THREDDS data

  • To: Erika Roesler <eroesler@xxxxxxxxx>
  • Subject: Re: [python-users] SSL errors in trying to access THREDDS data
  • From: kikocorreoso <kachine@xxxxxxxxxxxxxx>
  • Date: Fri, 13 Sep 2019 13:02:53 +0000
  • Feedback-id: B1t_sbGWMxjM91ODZ_dKpm-1pWpnPX7R1ULYSvrTYXlvmmE9myZ80jx05sFYs5EA2j4WUHPOrpLzt1tNbNcwBA==:Ext:ProtonMail
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, 13 de September de 2019 5:45, Erika Roesler <eroesler@xxxxxxxxx> 
wrote:

> Hello, I am not sure if this is a proxy problem and can be fixed with 
> settings, but I cannot run the GOES Aircraft example.
>
> I have already set verify=False in ~/.condarc and tried different locations 
> to change proxies.

It seems it is not a conda problem (conda is used to install packages among 
other stuff).

> Here's the full error, and any insight into this is greatly appreciated.
>
> python GOES_aircraft.py
>
> Traceback (most recent call last):
>
>   File "/anaconda3/lib/python3.7/site-packages/urllib3/connection.py", line 
> 159, in _new_conn
>
>     (self._dns_host, self.port), self.timeout, **extra_kw)
>
>   File "/anaconda3/lib/python3.7/site-packages/urllib3/util/connection.py", 
> line 80, in create_connection
>
>     raise err
>
>   File "/anaconda3/lib/python3.7/site-packages/urllib3/util/connection.py", 
> line 70, in create_connection
>
>     sock.connect(sa)
>
> TimeoutError: [Errno 60] Operation timed out
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>
>   File "/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", 
> line 594, in urlopen
>
>     self._prepare_proxy(conn)
>
>   File "/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", 
> line 805, in _prepare_proxy
>
>     conn.connect()
>
>   File "/anaconda3/lib/python3.7/site-packages/urllib3/connection.py", line 
> 301, in connect
>
>     conn = self._new_conn()
>
>   File "/anaconda3/lib/python3.7/site-packages/urllib3/connection.py", line 
> 168, in _new_conn
>
>     self, "Failed to establish a new connection: %s" % e)
>
> urllib3.exceptions.NewConnectionError: 
> <urllib3.connection.VerifiedHTTPSConnection object at 0x1a246c5828>: Failed 
> to establish a new connection: [Errno 60] Operation timed out
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>
>   File "/anaconda3/lib/python3.7/site-packages/requests/adapters.py", line 
> 449, in send
>
>     timeout=timeout
>
>   File "/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", 
> line 638, in urlopen
>
>     _stacktrace=sys.exc_info()[2])
>
>   File "/anaconda3/lib/python3.7/site-packages/urllib3/util/retry.py", line 
> 399, in increment
>
>     raise MaxRetryError(_pool, url, error or ResponseError(cause))
>
> urllib3.exceptions.MaxRetryError: 
> HTTPSConnectionPool(host='thredds.ucar.edu', port=443): Max retries exceeded 
> with url: 
> /thredds/catalog/satellite/goes/east/products/CloudAndMoistureImagery/CONUS/Channel08/20190913/catalog.xml
>  (Caused by ProxyError('Cannot connect to proxy.', 
> NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 
> 0x1a246c5828>: Failed to establish a new connection: [Errno 60] Operation 
> timed out')))
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>
>   File "GOES_aircraft.py", line 56, in <module>
>
>     ds = get_goes_image()
>
>   File "GOES_aircraft.py", line 47, in get_goes_image
>
>     'catalog.xml'.format(region, channel, date))
>
>   File "/anaconda3/lib/python3.7/site-packages/siphon/catalog.py", line 256, 
> in __init__
>
>     resp = session.get(catalog_url)
>
>   File "/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 
> 546, in get
>
>     return self.request('GET', url, **kwargs)
>
>   File "/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 
> 533, in request
>
>     resp = self.send(prep, **send_kwargs)
>
>   File "/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 
> 646, in send
>
>     r = adapter.send(request, **kwargs)
>
>   File "/anaconda3/lib/python3.7/site-packages/requests/adapters.py", line 
> 510, in send
>
>     raise ProxyError(e, request=request)
>
> requests.exceptions.ProxyError: HTTPSConnectionPool(host='thredds.ucar.edu', 
> port=443): Max retries exceeded with url: 
> /thredds/catalog/satellite/goes/east/products/CloudAndMoistureImagery/CONUS/Channel08/20190913/catalog.xml
>  (Caused by ProxyError('Cannot connect to proxy.', 
> NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 
> 0x1a246c5828>: Failed to establish a new connection: [Errno 60] Operation 
> timed out')))

It seems you need to configure your proxy settings before running the python 
script. Try the following in the command line:

> http_proxy=http://proxy_user:proxy_password@xxxxxxxxx:proxy_port && python 
> GOES_aircraft.py

(all the proxy_XXX should be changed with your proxy information).
  • 2019 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the python-users archives: