Skip to content

Fix for new zenodo API#372

Closed
ericpre wants to merge 1 commit into
fatiando:mainfrom
ericpre:fix_zenodo
Closed

Fix for new zenodo API#372
ericpre wants to merge 1 commit into
fatiando:mainfrom
ericpre:fix_zenodo

Conversation

@ericpre
Copy link
Copy Markdown

@ericpre ericpre commented Oct 17, 2023

Fixes #371. I find the new key by inspecting the response, not from a blessed official documentation... but it works...

Relevant issues/PRs:

Example:

import pooch

_GOSH_DOI = "10.5281/zenodo.7645765"
_GOSH_URL = f"doi:{_GOSH_DOI}/Segger_Guzzinati_Kohl_1.5.0.gosh"
_GOSH_KNOWN_HASH = "md5:7fee8891c147a4f769668403b54c529b"

gos_file_path = pooch.retrieve(
    url=_GOSH_URL,
    known_hash=_GOSH_KNOWN_HASH,
    progressbar=True,
)

@welcome
Copy link
Copy Markdown

welcome Bot commented Oct 17, 2023

💖 Thank you for opening your first pull request in this repository! 💖

A few things to keep in mind:

No matter what, we are really grateful that you put in the effort to do this!

@santisoler
Copy link
Copy Markdown
Member

Hi @ericpre! Thanks a lot for opening this PR. Apparently we were working on the same bugfix at the same time haha: #373

In that PR I made the same change for getting the list of files available in the repository, but also changed how the download url is built, and also fixed the registry population from the doi.

Since you're interested in solving the same issue, would you mind taking a look at that PR and provide some review? We can continue your work over.

@ericpre
Copy link
Copy Markdown
Author

ericpre commented Oct 17, 2023

Closing in favour of #373.

@ericpre ericpre closed this Oct 17, 2023
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

Successfully merging this pull request may close these issues.

KeyError: 'key' in ZenodoRepository.download_url() after Zenodo migration

2 participants