Skip to content

SkyView.get_images fails with Python 3 #593

@evertrol

Description

@evertrol

astroquery nicely points out that FITS files should be downloaded with a binary encoding, when SkyView.get_images_async uses the utils.common.FileContainer class to download FITS files from the skyview server.

For Python 2(.7), this still works fine. With Python 3(.5), one gets a UnicodeDecodeError.

The simple fix seems to be to change line 222 in skyview/core.py to

    return [commons.FileContainer(url, encoding='binary') for url in image_urls]

Since it appears this bug was not caught earlier (I can't find it in another issue), I'm either doing something wrong, or there may be a unit test missing. I hope someone can clarify this for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions