You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SyntaxWarnings for invalid escape sequences in regular expressions
Description
When running tests or using the library with Python 3.12, several SyntaxWarnings may occur due to invalid escape sequences in regular expressions in the pydub/utils.py file.
It seems these warnings don't affect the current functionality but may become errors in future Python versions. Addressing them would improve code quality and ensure future compatibility.
The text was updated successfully, but these errors were encountered:
SyntaxWarnings for invalid escape sequences in regular expressions
Description
When running tests or using the library with Python 3.12, several SyntaxWarnings may occur due to invalid escape sequences in regular expressions in the
pydub/utils.py
file.Warnings
The following warnings are displayed:
Affected code
The warnings appear in the
get_audio_properties
function inpydub/utils.py
.Possible solution
Adding an
r
prefix to the regular expression patterns to treat them as raw strings could resolve these warnings:So finally all the lines in for structure wold be:
Additional information
It seems these warnings don't affect the current functionality but may become errors in future Python versions. Addressing them would improve code quality and ensure future compatibility.
The text was updated successfully, but these errors were encountered: