Spaces:
Runtime error
Runtime error
Runtime error: pydub fails on Python 3.13 (no audioop) β adding audioop-lts should restore startup
#2
by nootxlm - opened
Startup currently fails with this chain (paths are python3.13):
from pydub import AudioSegment β pydub/utils.py: import pyaudioop as audioop β ModuleNotFoundError: No module named 'pyaudioop'
Python 3.13 removed the stdlib audioop module. pydub (pulled in by gradio, which requirements.txt leaves unpinned) falls back to a pyaudioop package that is not installed, so the import dies before the app starts. The README's sdk_version is 4.40.0 and no python_version is set, so the Space builds on the current default Python.
Two fixes, either is enough:
- add audioop-lts to requirements.txt (it provides the missing module on 3.13), or
- set python_version: 3.12 in the README header, where audioop still exists.
Check: with either change, the import chain above completes and the Space reaches its interface instead of the runtime error.