Skip to content

Conversation

NicolasHug
Copy link
Contributor

Fixes #724

I hope that this is the fix for the errors we're seeing in #724.:

FAILED test/test_encoders.py::TestAudioEncoder::test_num_channels[to_file-2-2] - RuntimeError: Could not open input file: /tmp/pytest-of-root/pytest-0/test_num_channels_to_file_2_2_0/output.mp3 Invalid data found when processing input

I think the error was that we were trying to read an encoded file that we had just encoded, and because that file wasn't fully close()ed yet, something was going wrong.

Hard to test for this. Let's monitor the repo and see if we still notice the same kind of issues.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 5, 2025
@NicolasHug NicolasHug merged commit e2dc28d into meta-pytorch:main Jul 7, 2025
37 of 41 checks passed
Dan-Flores pushed a commit to Dan-Flores/torchcodec that referenced this pull request Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Encoder tests sometimes fail on reading input

3 participants