Skip to content

[Bug] Zoo tests are flaky because of download errors #131

Open
@eginhard

Description

@eginhard

Describe the bug

The zoo tests regularly fail in CI because of temporary errors when downloading models, e.g. https://github.com/idiap/coqui-ai-TTS/actions/runs/11693792828/job/32566095448?pr=128

At leasts in tests it would be useful to retry the download 1-2 times, so one doesn't need to rerun the test manually

To Reproduce

Run tests in CI several times.

Expected behavior

Tests run without download errors.

Logs

ERROR:TTS.utils.manage:Bad zip file - https://github.com/coqui-ai/TTS/releases/download/v0.8.0_models/tts_models--sk--cv--vits.zip
Traceback (most recent call last):
  File "/home/runner/work/coqui-ai-TTS/coqui-ai-TTS/TTS/utils/manage.py", line 534, in _download_zip_file
    with zipfile.ZipFile(temp_zip_name) as z:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/.local/share/uv/python/cpython-3.11.10-linux-x86_64-gnu/lib/python3.11/zipfile.py", line 1313, in __init__
    self._RealGetContents()
  File "/home/runner/.local/share/uv/python/cpython-3.11.10-linux-x86_64-gnu/lib/python3.11/zipfile.py", line 1380, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
ERROR

Environment

TTS: 0.24.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions