我正在尝试通过终端执行以下给定命令:
translate bn en < '/home/agnihotri/results/Amader_Malda_4.jpg.txt'
py-translate库已成功安装。无论我执行任何命令,该错误均保持不变。
即使是像translate en <<< "hello world"
这样的命令
但是,在执行过程中,我得到以下给定的错误:
> Traceback (most recent call last): File
> "/usr/local/lib/python3.6/dist-packages/translate/coroutines.py", line
> 170, in spool
> stream = yield GeneratorExit
在处理上述异常期间,发生了另一个异常:
> Traceback (most recent call last): File
> "/usr/local/lib/python3.6/dist-packages/translate/coroutines.py", line
> 145, in set_task
> task = yield GeneratorExit
在处理上述异常期间,发生了另一个异常:
> Traceback (most recent call last): File "/usr/local/bin/translate",
> line 11, in <module>
> sys.exit(main()) File "/usr/local/lib/python3.6/dist-packages/translate/__main__.py", line
> 115, in main
> return source(spool(set_task(translate, translit=args.translit)), args.text) File
> "/usr/local/lib/python3.6/dist-packages/translate/coroutines.py", line
> 204, in source
> return target.close() File "/usr/local/lib/python3.6/dist-packages/translate/coroutines.py", line
> 180, in spool
> iterable.close() File "/usr/local/lib/python3.6/dist-packages/translate/coroutines.py", line
> 149, in set_task
> list(map(stream, workers.map(translator, queue))) File "/usr/local/lib/python3.6/dist-packages/translate/coroutines.py", line
> 103, in write_stream
> sentence, _ = script ValueError: too many values to unpack (expected 2)
请帮助。