autosub icon indicating copy to clipboard operation
autosub copied to clipboard

Thread arguments error

Open zzj0402 opened this issue 7 years ago • 8 comments

Converting speech regions to FLAC files: 100% |#################| Time: 0:00:02 Performing speech recognition: 100% |###########################| Time: 0:03:18 Exception in thread Thread-3: 0% | | ETA: --:--:-- Traceback (most recent call last): File "C:\Python27\lib\threading.py", line 801, in __bootstrap_inner self.run() File "C:\Python27\lib\threading.py", line 754, in run self.__target(*self.__args, **self.__kwargs) File "C:\Python27\lib\multiprocessing\pool.py", line 392, in _handle_results task = get() File "C:\Python27\lib\site-packages\oauth2client_helpers.py", line 133, in positional_wrapper return wrapped(*args, **kwargs) TypeError: init() takes at least 3 arguments (1 given)

zzj0402 avatar Nov 20 '17 16:11 zzj0402

I got the same problem:

# autosub -K key -F srt -S de -D en video
Converting speech regions to FLAC files: 100% |#| Time: 0:01:16
Performing speech recognition: 100% |#| Time: 0:03:12
Exception in thread Thread-3:0% |                                                                                                                                                                                                                             | ETA:  --:--:--
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/multiprocessing/pool.py", line 392, in _handle_results
    task = get()
  File "/usr/local/lib/python2.7/site-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: __init__() takes at least 3 arguments (1 given)

Looks like a change in the way API keys are being used. Or the key needs to be in a certain format?

derchrisuk avatar Dec 04 '17 13:12 derchrisuk

Same here

 ./bin/autosub -K  key=###### -C 3  -S en -D it /home/to/my/file/a.mp4 
Converting speech regions to FLAC files: 100% |############| Time: 0:00:03
Performing speech recognition: 100% |######################| Time: 0:02:08
Exception in thread Thread-3:3% |                          | ETA:  0:00:00
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 392, in _handle_results
    task = get()
  File "/home/lorenzo/.local/lib/python2.7/site-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: __init__() takes at least 3 arguments (1 given)

P.s. without calling API it works

lonasozo avatar Dec 12 '17 11:12 lonasozo

btw, have you checked that you have the Translate API enabled? It should be enabled, but needs a billing to work. I'm not able to setup billing at the moment, but this could be the problem here.

derchrisuk avatar Dec 12 '17 12:12 derchrisuk

LOLZ, that was the problem. It works 🗡

lonasozo avatar Dec 12 '17 13:12 lonasozo

I will add a PR if I find some time to catch this error.

derchrisuk avatar Dec 12 '17 13:12 derchrisuk

I know this is an older issue, but thought I'd just add that running without -C worked for me.

Tarada42 avatar Feb 28 '18 00:02 Tarada42

still have this problem, tried all these suggestions above, it still does not work.

visionandy avatar Oct 14 '19 04:10 visionandy

@visionandy You can try my modified version of autosub which can translate subtitles by using py-googletrans.

BingLingGroup avatar Nov 10 '19 02:11 BingLingGroup