BingLingGroup / autosub

Command-line utility to transcribe/translate from video/audio/subtitles to subtitles
GNU General Public License v2.0
1.98k stars 244 forks source link

TypeError: cannot unpack non-iterable NoneType object #136

Closed ghost closed 4 years ago

ghost commented 4 years ago

Make sure you have read the readme, searched and read the issues related to yours. Otherwise it will be considered as a duplicate which will be closed immediately.

Describe the bug TypeError: cannot unpack non-iterable NoneType object

To Reproduce autosub -i test.mp4 -er "test.times.srt" -sapi gcsv1 -skey [REDACTED] -S de-de -D en

-sapi gcsv1 -S de-de -D en

I've also tried with -S auto, -sapi gsv2, I've tried not using -er and letting it figure out the regions on its own, it always does the same thing.
autosub -i test.mp4 -er "test.times.srt" -sapi gcsv1 -skey [REDACTED] -S de-de -D en
Use external speech regions.
C:\Program Files\ImageMagick-7.0.10-Q16\ffmpeg.exe -hide_banner -y -i "test.mp4" -vn -ac 1 -ar 16000 -loglevel error "C:\Users\REALDR~1\AppData\Local\Temp\tmpagfbmzk5.wav"

Converting speech regions to short-term fragments.
Converting: 100% |####################################################| Time:  0:00:04 Use the API key given in the option "-skey"/"--speech-key".

Sending short-term fragments to Google Cloud Speech V1P1Beta1 API and getting result.
Speech-to-Text: 100% |################################################| Time:  0:00:34 Traceback (most recent call last):
  File "autosub\__main__.py", line 25, in <module>
  File "autosub\__init__.py", line 159, in main
  File "autosub\cmdline_utils.py", line 1369, in audio_or_video_prcs
TypeError: cannot unpack non-iterable NoneType object
[14460] Failed to execute script __main__
Use this to display your config.

Expected behavior A clear and concise description of what you expected to happen. Transcribe and translate subtitles.

Screenshots If applicable, add screenshots to help explain your problem. But it is not recommended using screenshots to demonstrate the commandline output unless you think it really matters.

Environment (please complete the following information):

Additional context (Optional) Add any other context about the problem here.

BingLingGroup commented 4 years ago

Commit https://github.com/BingLingGroup/autosub/commit/0768a5a4796166d8acd12c80950b5d0fac469621 should fix this. Install the lastest dev version and try again.