Skip to content

Pydub dependency raises warnings #58

@EnjoyBacon7

Description

@EnjoyBacon7

Pydub (required by a dependency) has an unresolved issue pertaining to a SyntaxWarning. As this does not affect OpenRAG functionnally, the warnings should be suppressed voluntarily for clarity. The Pydub issue is discussed here in more detail. Other projects have already gone this route, like pipecat.

In our case, this adds these warnings on startup:

(DocSerializer pid=609) /app/.venv/lib/python3.12/site-packages/pydub/utils.py:300: SyntaxWarning: invalid escape sequence '\('
(DocSerializer pid=609)   m = re.match('([su]([0-9]{1,2})p?) \(([0-9]{1,2}) bit\)$', token)
(DocSerializer pid=609) /app/.venv/lib/python3.12/site-packages/pydub/utils.py:301: SyntaxWarning: invalid escape sequence '\('
(DocSerializer pid=609)   m2 = re.match('([su]([0-9]{1,2})p?)( \(default\))?$', token)
(DocSerializer pid=609) /app/.venv/lib/python3.12/site-packages/pydub/utils.py:310: SyntaxWarning: invalid escape sequence '\('
(DocSerializer pid=609)   elif re.match('(flt)p?( \(default\))?$', token):
(DocSerializer pid=609) /app/.venv/lib/python3.12/site-packages/pydub/utils.py:314: SyntaxWarning: invalid escape sequence '\('
(DocSerializer pid=609)   elif re.match('(dbl)p?( \(default\))?$', token):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions