Skip to content

Commit 0f55d01

Browse files
committed
Merge pull request #594 from evertrol/fix/skyview_get_images
Fix SkyView encoding bug for downloading images
2 parents 6552692 + 476fa95 commit 0f55d01

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

astroquery/skyview/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def get_images_async(self, position, survey, coordinates=None,
219219
gridlabels, radius=radius,
220220
height=height, width=width,
221221
cache=cache)
222-
return [commons.FileContainer(url) for url in image_urls]
222+
return [commons.FileContainer(url, encoding='binary') for url in image_urls]
223223

224224
@prepend_docstr_noreturns(get_images.__doc__)
225225
def get_image_list(self, position, survey, coordinates=None,

astroquery/skyview/tests/test_skyview_remote.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22
from astropy.tests.helper import remote_data
3+
from astropy.io.fits import HDUList
34

45
from ...skyview import SkyView
56
from .test_skyview import data_path
@@ -15,11 +16,9 @@ def test_get_image_list():
1516

1617
@remote_data
1718
def test_get_images():
18-
images = SkyView().get_image_list(position='Eta Carinae',
19-
survey=['2MASS-K'])
19+
images = SkyView().get_images(position='Eta Carinae', survey=['2MASS-J'])
2020
assert len(images) == 1
21-
for im in images:
22-
assert im.startswith('http://skyview.gsfc.nasa.gov/')
21+
assert isinstance(images[0], HDUList)
2322

2423
@remote_data
2524
def test_survey_list():

0 commit comments

Comments
 (0)