sczesla / PyAstronomy

A collection of astronomy-related routines in Python
152 stars 35 forks source link

SWEETCat() download error... #50

Closed sousasag closed 4 years ago

sousasag commented 4 years ago

Hi, I am getting this error: Not sure if you can fix it on your side, or if we need to do something in the sweet-cat site.

Python 3.8.2 (default, Jul 16 2020, 14:00:26) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.13.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from PyAstronomy import pyasl                                                                                                                                  

In [2]: scs = pyasl.SWEETCat()

Summary of error output:

A PyA error occurred:
---------------------
Type of error: PyA Network Error
What happened?
    Could not download SWEET-Cat data. The following error was raised: <urlopen error [SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:1108)>
sczesla commented 4 years ago

Hi, I also noticed this error and I tried to fix it (but unfortunately not very successfully). As far as I could find out, the reason is that the server runs an older version of TLS (TLS 1.0 or 1.1, a network security protocol), which is outdated and pressure is mounting to disregard it, which is a good idea from the security POV but not so much for convenience. I also get a warning from the browser about this, but I am still able to ignore it. The newer versions of Python are usually shipped with libraries, which will not allow to circumvent it. It can be done, but requires custom re-compiling, which is also not a convenient option. Long story short, I think the server side has to upgrade its TLS support to at least version 1.2. Cheers, Stefan

sousasag commented 4 years ago

Hi,

Yes, indeed, I check with the IT services and they are aware of the issue. However not sure when the servers will be updated. Maybe a quick fix on your side, is to extract the table from this file, if possible:

https://raw.githubusercontent.com/iastro-pt/SWEET-Cat/master/WEBSITE_online_EU.rdb

This file is the one that we use to uploaded it to the website.

Cheers, Sérgio

sczesla commented 4 years ago

Hi Sérgio, Perfect. I released a new version with that fix. Cheers, Stefan