question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CCDData.read Python 3.10 issue? (MAST SSLv3)

See original GitHub issue

Description

When trying to open a URL with CCDData.read using python 10 I get the following error:

<urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997)>

When I downgraded to python 3.9, the same code works. I checked with python 3.7 and it works so it must have something to do with python 3.10.

Expected behavior

Load data without error.

Actual behavior

<urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997)>

Steps to Reproduce

  1. Install astropy with python 3.10
  2. import astropy with from astropy.nddata import CCDData
  3. data = CCDData.read('https://archive.stsci.edu/pub/hlsp/frontier/abell2744/images/hst/v1.0/hlsp_frontier_hst_acs-60mas_abell2744_f435w_v1.0_drz.fits', cache=True)

Code:

from astropy.nddata import CCDData
data = CCDData.read('https://archive.stsci.edu/pub/hlsp/frontier/abell2744/images/hst/v1.0/hlsp_frontier_hst_acs-60mas_abell2744_f435w_v1.0_drz.fits', cache=True)

System Details

MacBook Big Sur running conda

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
falkbencommented, Mar 15, 2022

Yes, this should be fixed now.

3reactions
tomdonaldsoncommented, Mar 8, 2022

I am still able to reproduce the problem on my Mac. One thing I noticed is that after successfully doing the download with Python 3.9, the download is in astropy’s cache, so it would appear to succeed in Python 3.10 (though very quickly). If I set cache=False, then I still see the problem:

from astropy.nddata import CCDData
data = CCDData.read('https://archive.stsci.edu/pub/hlsp/frontier/abell2744/images/hst/v1.0/hlsp_frontier_hst_acs-60mas_abell2744_f435w_v1.0_drz.fits', cache=False)
print(data)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to estabish a SLDAP connection using Python 3.10.x
Getting some debug information from the server side, I found the issue was coming up because of "no common cypher" could between client...
Read more >
CCDData Class — Astropy v5.2
Creating a CCDData object from any array-like data using astropy.nddata is convenient: ... A FITS header, for example, is not case-sensitive, but a...
Read more >
Using the CCDData image class: I/O, properties and arithmetic
The tools in ccdproc accept only CCDData objects, a subclass of NDData . ... A FITS header, for example, is not case sensitive,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found