Skip to content

Return SyntaxWarning errors #400

Closed
Closed

Description

@marillat

With PySceneDetect 0.6.4 debian unstable amd64 python 3.11.9
I see the warnings

/usr/lib/python3/dist-packages/scenedetect/_cli/__init__.py:927: SyntaxWarning: invalid escape sequence '\$'
  help='Filename format to use for the scene list CSV file. You can use the $VIDEO_NAME macro in the file name. Note that you may have to wrap the name using single quotes or use escape characters (e.g. -f=\$VIDEO_NAME-Scenes.csv).%s'
/usr/lib/python3/dist-packages/scenedetect/_cli/__init__.py:1065: SyntaxWarning: invalid escape sequence '\$'
  """Split input video using ffmpeg or mkvmerge.
/usr/lib/python3/dist-packages/scenedetect/_cli/__init__.py:1208: SyntaxWarning: invalid escape sequence '\$'
  """Create images for each detected scene.

Activity

  1. Breakthrough commented on Jun 11, 2024

    @Breakthrough
    Owner

    Thanks for letting me know, I should have a fix for this within a day or two.

    Could you share the output of running the scenedetect version command? I'm having trouble reproducing this locally, and don't see the warnings in any of the Python 3.12 builds (example).

    This is definitely an issue, and looks like this was upgraded from DeprecationWarning to SyntaxWarning in Python 3.12. I want to make sure these errors show up in builds here on Github so we can make sure it does not reoccur in the future, so I wonder if perhaps one of the third-party libraries being used is changing the default warning filter.

  2. marillat commented on Jun 11, 2024

    @marillat
    Author

    I see these warnings when the source is byte compiled
    byte compilation is done when the package is installed.
    Debian package from https://www.deb-multimedia.org/

    $ sudo  py3compile -f -p python3-scenedetect 
    /usr/lib/python3/dist-packages/scenedetect/_cli/__init__.py:927: SyntaxWarning: invalid escape sequence '\$'
      help='Filename format to use for the scene list CSV file. You can use the $VIDEO_NAME macro in the file name. Note that you may have to wrap the name using single quotes or use escape characters (e.g. -f=\$VIDEO_NAME-Scenes.csv).%s'
    ...
    
  3. added this to the 0.6.4.1 milestone on Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions