You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
original: (optional)]]>
使用有道备用翻译通道2
使用接口,仅支持中英互译,将翻译为英文
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.9/site-packages/mkTranslation/translate_youdao.py", line 48, in trans1
if(resp.json()['translation']):
KeyError: 'translation'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.9/site-packages/mkTranslation/translate_youdao.py", line 76, in trans2
return resp.json()['translateResult'][0][0]['tgt']
KeyError: 'translateResult'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/homebrew/bin/translate", line 33, in
main()
File "/opt/homebrew/bin/translate", line 29, in main
mkTranslator().translate_doc(filepath=args.file_path, destination=args.dest_language,sourcelanguage=args.sourcelanguage,channel=args.channel)
File "/opt/homebrew/lib/python3.9/site-packages/mkTranslation/translator.py", line 168, in translate_doc
self.write_tx(filepath,newFile,r">\s*(.+?)\s*",'>'+'content'+'',destination,sourcelanguage,channel)
File "/opt/homebrew/lib/python3.9/site-packages/mkTranslation/translator.py", line 101, in write_tx
txc = self.translate(line[0],des,lan,channel)
File "/opt/homebrew/lib/python3.9/site-packages/mkTranslation/translator.py", line 75, in translate
return mkYouDaoTranslator().translate(word,destination,language)
File "/opt/homebrew/lib/python3.9/site-packages/mkTranslation/translate_youdao.py", line 37, in translate
return self.trans1(text,dest,src)
File "/opt/homebrew/lib/python3.9/site-packages/mkTranslation/translate_youdao.py", line 52, in trans1
return self.trans2(text,dest,src)
File "/opt/homebrew/lib/python3.9/site-packages/mkTranslation/translate_youdao.py", line 78, in trans2
return self.trans3(text,dest,src)
File "/opt/homebrew/lib/python3.9/site-packages/mkTranslation/translate_youdao.py", line 94, in trans3
return self.result['translation'][0]
KeyError: 'translation'
The text was updated successfully, but these errors were encountered:
original: (optional)]]>
使用有道备用翻译通道2
使用接口,仅支持中英互译,将翻译为英文
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.9/site-packages/mkTranslation/translate_youdao.py", line 48, in trans1
if(resp.json()['translation']):
KeyError: 'translation'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.9/site-packages/mkTranslation/translate_youdao.py", line 76, in trans2
return resp.json()['translateResult'][0][0]['tgt']
KeyError: 'translateResult'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/homebrew/bin/translate", line 33, in
main()
File "/opt/homebrew/bin/translate", line 29, in main
mkTranslator().translate_doc(filepath=args.file_path, destination=args.dest_language,sourcelanguage=args.sourcelanguage,channel=args.channel)
File "/opt/homebrew/lib/python3.9/site-packages/mkTranslation/translator.py", line 168, in translate_doc
self.write_tx(filepath,newFile,r">\s*(.+?)\s*",'>'+'content'+'',destination,sourcelanguage,channel)
File "/opt/homebrew/lib/python3.9/site-packages/mkTranslation/translator.py", line 101, in write_tx
txc = self.translate(line[0],des,lan,channel)
File "/opt/homebrew/lib/python3.9/site-packages/mkTranslation/translator.py", line 75, in translate
return mkYouDaoTranslator().translate(word,destination,language)
File "/opt/homebrew/lib/python3.9/site-packages/mkTranslation/translate_youdao.py", line 37, in translate
return self.trans1(text,dest,src)
File "/opt/homebrew/lib/python3.9/site-packages/mkTranslation/translate_youdao.py", line 52, in trans1
return self.trans2(text,dest,src)
File "/opt/homebrew/lib/python3.9/site-packages/mkTranslation/translate_youdao.py", line 78, in trans2
return self.trans3(text,dest,src)
File "/opt/homebrew/lib/python3.9/site-packages/mkTranslation/translate_youdao.py", line 94, in trans3
return self.result['translation'][0]
KeyError: 'translation'
The text was updated successfully, but these errors were encountered: