Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: SHA256 hash of downloaded file (ascent.dat) does not match the known hash #4

Open
pllim opened this issue Dec 19, 2022 · 4 comments

Comments

@pllim
Copy link

pllim commented Dec 19, 2022

Hello. We started getting this error when trying to use this file for a test downstream. Is this expected? How do I make it accept the new SHA? Thanks!

Example log: https://github.com/astropy/astropy/actions/runs/3735545217/jobs/6338926910

ValueError: SHA256 hash of downloaded file (ascent.dat) does not match the known hash: ...
Deleted download for safety.
The downloaded file may have been corrupted or the known hash may be outdated.
        else:
>           scipy_data = scipy.datasets.ascent()

astropy/io/fits/tests/test_image.py:1202: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
scipy/datasets/_fetchers.py:71: in ascent
    fname = fetch_data("ascent.dat")
scipy/datasets/_fetchers.py:31: in fetch_data
    return data_fetcher.fetch(dataset_name)
pooch/core.py:587: in fetch
    stream_download(
pooch/core.py:773: in stream_download
    hash_matches(tmp, known_hash, strict=True, source=str(fname.name))
@tupui
Copy link
Member

tupui commented Dec 23, 2022

cc @AnirudhDagar

@AnirudhDagar
Copy link
Member

AnirudhDagar commented Dec 23, 2022

Hi @pllim, thanks for the report and sorry for the late reply. I'm on vacation at the moment (typing from my mobile). Can I take a look at this by EOD if not very urgent?

QQ: Are you using the latest SciPy from main branch, or is it the 1.10rc1 in the CI? This should go away with 1.10rc2 and the latest main branch.

Thanks for the ping @tupui!

@pllim
Copy link
Author

pllim commented Dec 23, 2022

Hello and thanks for reply. I ended up just directly downloading and unpicking the file myself. We only need it for a single test using the data, not really using scipy functionality.

If no one else has encountered this error, then feel free to close. Happy holidays!

@AnirudhDagar
Copy link
Member

As i said it should not happen with 1.10 rc2 release or main branch, but, let's leave this open for a couple more weeks, just in case someone faces the same.

Ideally, we will never change the data files (their hash) without some kind of deprecation. Since this scipy.datasets sub-module was in dev (waiting to be released in 1.10), we changed ascent data file without raising any warnings, which probably broke AstroPy.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants