jvines / astroARIADNE

Easy stellar SED fitting!
MIT License
57 stars 7 forks source link

connection problem #25

Closed AstroSong closed 3 years ago

AstroSong commented 3 years ago

Hi @jvines, I have a connection problem when I run the astroARIADNE code:

from astroARIADNE.star import Star                                                                                                         

ra = 231.9519945
dec = +35.6159203
starname='TIC 16320250'
gaia_id = 1375051479376039040

s = Star(starname, ra=ra, dec=dec, g_id=gaia_id)

Holoviews not imported. Some visualizations will not be available. Created TAP+ (v1.2.1) - Connection: Host: gea.esac.esa.int Use HTTPS: True Port: 443 SSL Port: 443 Created TAP+ (v1.2.1) - Connection: Host: geadata.esac.esa.int Use HTTPS: True Port: 443 SSL Port: 443

  #####################################
  ##             ARIADNE             ##
  #####################################

spectrAl eneRgy dIstribution bAyesian moDel averagiNg fittEr

      Author : Jose Vines
      Contact : jose . vines at ug . uchile . cl
      Star : TIC 16320250
  *** LOOKING UP ARCHIVAL INFORMATION ***

Traceback (most recent call last): File "sedfit.py", line 10, in s = Star(starname, ra=ra, dec=dec, g_id=gaia_id) File "/usr/local/lib/python3.7/site-packages/astroARIADNE-0.5.0-py3.7.egg/astroARIADNE/star.py", line 251, in init File "/usr/local/lib/python3.7/site-packages/astroARIADNE-0.5.0-py3.7.egg/astroARIADNE/librarian.py", line 168, in init File "/usr/local/lib/python3.7/site-packages/astroARIADNE-0.5.0-py3.7.egg/astroARIADNE/librarian.py", line 194, in gaia_params File "/usr/local/lib/python3.7/site-packages/astroquery/utils/tap/core.py", line 402, in launch_job_async autorun) File "/usr/local/lib/python3.7/site-packages/astroquery/utils/tap/core.py", line 611, in __launchJob verbose=verbose) File "/usr/local/lib/python3.7/site-packages/astroquery/utils/tap/conn/tapconn.py", line 273, in execute_tappost return self.execute_post(context, data, content_type, verbose) File "/usr/local/lib/python3.7/site-packages/astroquery/utils/tap/conn/tapconn.py", line 404, in execute_post response = conn.getresponse() File "/usr/local/lib/python3.7/http/client.py", line 1321, in getresponse response.begin() File "/usr/local/lib/python3.7/http/client.py", line 296, in begin version, status, reason = self._read_status() File "/usr/local/lib/python3.7/http/client.py", line 265, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response

Is it due to my internet connection? Thanks for your help.

Cheers, Song

AstroSong commented 3 years ago

I have solved the problem. First, I update the astroquery; then I install openssl and re-compile python3.7. Now it's ok.

denizcdursun commented 2 years ago

Hello @AstroSong can you tell me how you solved the problem?

AstroSong commented 2 years ago

Hello @AstroSong can you tell me how you solved the problem?

Hi, it is mainly due to the installation problem of SSL. So I first install openssl and re-compile python3.7.

denizcdursun commented 2 years ago

Thank you @AstroSong I found this solution, insert this code at the beginning of my source file:

import ssl

try:
    _create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
    # Legacy Python that doesn't verify HTTPS certificates by default
    pass
else:
    # Handle target environment that doesn't support HTTPS verification
    ssl._create_default_https_context = _create_unverified_https_context