Skip to content

SkyView.get_images() fails with Connection aborted. OSError(57, 'Socket is not connected') on macOS #3345

Description

@orpereira

Summary

When using astroquery.skyview.SkyView.get_images() on macOS (Python 3.9, astroquery version 0.4.6), the connection fails with:

Connection aborted. OSError(57, 'Socket is not connected')

This occurs even though the SkyView URL is accessible via a standard requests.get() call.

Steps to reproduce

from astroquery.skyview import SkyView
from astropy.coordinates import SkyCoord
from astropy import units as u


coord = SkyCoord("10h00m00s +02d12m00s", unit=(u.hourangle, u.deg))
SkyView.get_images(position=coord, survey='DSS', pixels='400')

Results in: requests.exceptions.ConnectionError: ('Connection aborted.', OSError(57, 'Socket is not connected'))

What I've tried

Verified the endpoint is live:

import requests
r = requests.get("https://skyview.gsfc.nasa.gov/current/cgi/survey.pl")
print(r.status_code)  # returns 200

Cleared the astroquery cache (~/.astropy/cache/astroquery/SkyView)
Confirmed it only fails within astroquery (not with raw requests.get())

My environment is:
macOS, python3.9, astroquery 0.4.6, requests 2.32.3, urllib3 1.26.20

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions