smacke / ffsubsync

Automagically synchronize subtitles with video.
MIT License
6.74k stars 278 forks source link

ModuleNotFoundError: No module named 'typing_extensions' #128

Closed VimWei closed 3 years ago

VimWei commented 3 years ago

Environment (please complete the following information):

Describe the bug

install ffsubsync pip install ffsubsync, but can't run any subsync command.

2021-05-19_035455

To Reproduce

subsync --version

2021-05-19_035639

ffs Welcome.mp4 -i Welcome.srt -o WelcomeNew.srt

2021-05-19_035730

Output

Traceback (most recent call last):
  File "c:\users\chenw\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\chenw\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\chenw\AppData\Local\Programs\Python\Python39\Scripts\ffs.exe\__main__.py", line 4, in <module>
  File "c:\users\chenw\appdata\local\programs\python\python39\lib\site-packages\ffsubsync\__init__.py", line 21, in <module>
    from .ffsubsync import main  # noqa
  File "c:\users\chenw\appdata\local\programs\python\python39\lib\site-packages\ffsubsync\ffsubsync.py", line 14, in <module>
    from ffsubsync.aligners import FFTAligner, MaxScoreAligner, FailedToFindAlignmentException
  File "c:\users\chenw\appdata\local\programs\python\python39\lib\site-packages\ffsubsync\aligners.py", line 9, in <module>
    from ffsubsync.sklearn_shim import Pipeline, TransformerMixin
  File "c:\users\chenw\appdata\local\programs\python\python39\lib\site-packages\ffsubsync\sklearn_shim.py", line 12, in <module>
    from typing_extensions import Protocol
ModuleNotFoundError: No module named 'typing_extensions'
dolohow commented 3 years ago

For now you can do

pip install typing_extensions
smacke commented 3 years ago

Thanks @VimWei for filing the issue and @dolohow for the workaround. Apparently I forgot to add typing_extensions to requirements.txt, woops. Just pushed a fix, issue should be resolved after pip install --upgrade ffsubsync; please let me know if not.