Skip to content

BUG: vocalpy.example() raises error when datasets require download #228

Open

Description

@NickleDave

Describe the bug

Calling vocalpy.example() with the name of an example dataset that requires a download results in a cryptic error.

To Reproduce

>>> import vocalpy as voc
>>> voc.example("bfsongrepo")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
    voc.example("bfsongrepo")
    ~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/home/ildefonso/Documents/repos/vocalpy/vocalpy/src/vocalpy/examples/_examples.py", line 398, in example
    return example_.load(return_path=return_path)
           ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ildefonso/Documents/repos/vocalpy/vocalpy/src/vocalpy/examples/_examples.py", line 257, in load
    POOCH.load_registry_from_doi()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/ildefonso/Documents/repos/vocalpy/vocalpy/.venv/lib/python3.13/site-packages/pooch/core.py", line 701, in load_registry_from_doi
    repository = doi_to_repository(doi)
  File "/home/ildefonso/Documents/repos/vocalpy/vocalpy/.venv/lib/python3.13/site-packages/pooch/downloaders.py", line 690, in doi_to_repository
    archive_url = doi_to_url(doi)
  File "/home/ildefonso/Documents/repos/vocalpy/vocalpy/.venv/lib/python3.13/site-packages/pooch/downloaders.py", line 653, in doi_to_url
    raise ValueError(
        f"Archive with doi:{doi} not found (see {url}). Is the DOI correct?"
    )
ValueError: Archive with doi:10.5281/zenodo.10685639 not found (see https://zenodo.org/doi/10.5281/zenodo.10685639). Is the DOI correct?
>>> 

Expected behavior

That calling bfsongrepo = voc.example("bfsongrepo") works as expected

Desktop (please complete the following information):

  • Any

Additional context

This is causing CI to fail right now:
https://github.com/vocalpy/vocalpy/actions/runs/20418516011/job/58970029807

Just raising an issue to track before someone else runs into this

Underlying issue probably has something to do with pooch + Zenodo, see more details here, including what I've done so far to troubleshoot:
fatiando/pooch#502

Activity

  1. self-assigned this
    on Dec 26, 2025
  2. added
    BUG: a bug
    on Dec 26, 2025
  3. changed the title [-]BUG: `vocalpy.example()` raises error when datasets that require download[/-] [+]BUG: `vocalpy.example()` raises error when datasets require download[/+] on Dec 26, 2025
  4. NickleDave commented on Dec 29, 2025

    @NickleDave
    ContributorAuthor

    Potential workaround: fatiando/pooch#502 (comment)

    We are experiencing the same issue and found that if we bypass the DOI url and set base_url to the resolved Zenodo url with "/files" appended (so https://zenodo.org/records/14674504/files in your case) then the download works. Unfortunately any testing with xdist will immediately get truly rate limited with this approach. Perhaps a session-scoped fixture that downloads the data once to a cache could help with that, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BUG: a bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions