-
-
Notifications
You must be signed in to change notification settings - Fork 315
Description
Environment (please complete the following information):
- Ubuntu Linux 24.04
- python version 3.12.3
- subsync version 0.4.26
Describe the bug
using ffsubsync in unmanic 0.4.0 fails (prior to 0.4 upgrade, it worked fine) - see Output secton for Traceback
To Reproduce
pip install ffsubsync in unmanic 0.4 docker environment and try to run ffsubsync on a file.
Expected behavior
ffsubsync should run normally - see additional context below
Output
Traceback (most recent call last):
File "/opt/venv/bin/ffs", line 8, in <module>
sys.exit(main())
^^^^^^
File "/opt/venv/lib/python3.12/site-packages/ffsubsync/ffsubsync.py", line 719, in main
return run(parser)["retval"]
^^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/ffsubsync/ffsubsync.py", line 501, in run
sync_was_successful = _run_impl(args, result)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/ffsubsync/ffsubsync.py", line 437, in _run_impl
reference_pipe.fit(args.reference)
File "/opt/venv/lib/python3.12/site-packages/ffsubsync/sklearn_shim.py", line 255, in fit
self._final_estimator.fit(Xt, y, **fit_params)
File "/opt/venv/lib/python3.12/site-packages/ffsubsync/speech_transformers.py", line 333, in fit
detector = _make_webrtcvad_detector(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/ffsubsync/speech_transformers.py", line 136, in _make_webrtcvad_detector
import webrtcvad
File "/opt/venv/lib/python3.12/site-packages/webrtcvad.py", line 1, in <module>
import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
Test case
[Optional] You can bundle additional debugging information into a tar archive as follows:
subsync vid.mkv -i in.srt -o out.srt --make-test-case
This will create a file vid.mkv.$timestamp.tar.gz or similar a few KiB in size; you can attach it by clicking the "attach files" button below.
Additional context
I patched my install to modify webrtcvad.py to remove the import pkg_resources line and set the webrtcvad version to the installed version as shown by pip instead of trying to read it from pkg_resources.
My question is whether you intend to make ffsubsync compatible with importlib instead of / in addition to setuptools? If not, it'd help to know that... unmanic can possibly lock it's container to an older setuptools.