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

Audio asset with pydub conversion fails to write on S3 #2045

Closed
lhoestq opened this issue Nov 2, 2023 · 1 comment
Closed

Audio asset with pydub conversion fails to write on S3 #2045

lhoestq opened this issue Nov 2, 2023 · 1 comment
Assignees
Labels
bug Something isn't working P1 Not as needed as P0, but still important/wanted

Comments

@lhoestq
Copy link
Member

lhoestq commented Nov 2, 2023

See https://huggingface.co/datasets/zeio/auto-pale/discussions/1 (ogg audio files)

File \"/src/libs/libcommon/src/libcommon/viewer_utils/asset.py\", line 111, in create_audio_file
   segment.export(f, format=suffix[1:])
File \"/src/services/worker/.venv/lib/python3.9/site-packages/pydub/audio_segment.py\", line 868, in export
   out_f.seek(0)
File \"/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/spec.py\", line 1737, in seek
   aise OSError(ESPIPE, \"Seek only available in read mode\")
OSError: [Errno 29] Seek only available in read mode

we might have to write to a BytesIO buffer before writing the audio actual audio asset file, since fsspec doesn't allow seek for wb files somehow.

@lhoestq lhoestq added the bug Something isn't working label Nov 2, 2023
@severo severo added the P1 Not as needed as P0, but still important/wanted label Nov 2, 2023
@AndreaFrancis AndreaFrancis self-assigned this Nov 6, 2023
@AndreaFrancis
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 Not as needed as P0, but still important/wanted
Projects
None yet
Development

No branches or pull requests

3 participants