Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return SyntaxWarning errors #400

Closed
marillat opened this issue Jun 11, 2024 · 2 comments
Closed

Return SyntaxWarning errors #400

marillat opened this issue Jun 11, 2024 · 2 comments
Labels
Milestone

Comments

@marillat
Copy link

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.
@Breakthrough
Copy link
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.

@marillat
Copy link
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'
...

@Breakthrough Breakthrough added this to the 0.6.4.1 milestone Jun 12, 2024
Breakthrough added a commit that referenced this issue Sep 8, 2024
* [cli] Fix SyntaxWarning due to incorrect escaping #400

* [cli] Fix exception when detect-hash is set as default detector

* [cli] Fix new detectors not working with default-detector

* [cli] Fix outstanding CodeQL lint warnings.

* [cli] Unify type hints and clean up imports

* add detect-hash and detect-hist as options for default-detector (#403)

* Bump jinja2 from 3.1.3 to 3.1.4 in /website (#397)

Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](pallets/jinja@3.1.3...3.1.4)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [dist] Fix Github license detection.

* [dist] Use Github license template. Fixes #365.

* [docs] Add CITATION.cff #399

* [dist] Prepare for v0.6.4 release.

* [build] Auto-generate .version_info and verify installer version.

* [build] Add missing pre-release script invocation for Windows build on Github.

* [build] Fix incorrect path to pre_release script.

* [build] Omit unnecessary files in distributed docs.

* [dist] Update Windows installer for v0.6.4.

Bump OpenCV to 4.10.

* [build] Use specific OpenCV version for Windows build.

* [dist] Release v0.6.4.

* [docs] Update changelog and image URI.

* add detect-hash and detect-hist as options for default-detector

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Breakthrough <[email protected]>

* [dist] Prepare changelog for next release.

* [project] Switch from yapf to ruff for formatting

* [project] Use ruff for linting project

Now passes `ruff check` with some fixes suppressed.

* [project] Enable more lint rules.

* [docs] Change single quotes to double quotes.

* Transition from yapf to ruff (#418)

* [project] Enable more lint rules.

* Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows in the github_actions group across 1 directory (#417)

Bump actions/download-artifact

Bumps the github_actions group with 1 update in the /.github/workflows directory: [actions/download-artifact](https://github.com/actions/download-artifact).


Updates `actions/download-artifact` from 3 to 4.1.7
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v3...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  dependency-group: github_actions
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [build] Fix incorrect version conversion for Pyinstaller build

* [build] Update workflow actions.

* [build] Update workflow actions.

* Revert "[build] Update workflow actions."

Mistaken merge commit. This reverts commit c23eee8.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: moritzbrantner <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants