Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

youdao_post.py 报错不能正常使用 #9

Open
jinastro opened this issue Oct 2, 2022 · 2 comments
Open

youdao_post.py 报错不能正常使用 #9

jinastro opened this issue Oct 2, 2022 · 2 comments

Comments

@jinastro
Copy link

jinastro commented Oct 2, 2022

系统 ubuntu22.04

./youdao_post.py "test"
python3.5

Traceback (most recent call last):
File "./youdao_post.py", line 79, in
for res in obj1['translateResult'][0]:
KeyError: 'translateResult'

python3.10报错

Traceback (most recent call last):
File "~/gd_plugin/youdao/./youdao_post.py", line 74, in
obj1 = json.loads(json1,encoding='utf-8')
File "/usr/lib/python3.10/json/init.py", line 359, in loads
return cls(**kw).decode(s)
TypeError: JSONDecoder.init() got an unexpected keyword argument 'encoding'

@easeflyer
Copy link
Owner

感谢反馈,经过实验,开放的 post 接口的翻译质量,貌似不如 get 接口,因此就没有再继续完善 post 接口。 youdao_get.py 也可以处理小段文字,方译质量相对较高。所以可以考虑使用 youdao_get.py。

@jinastro
Copy link
Author

jinastro commented Nov 4, 2022

感谢反馈,经过实验,开放的 post 接口的翻译质量,貌似不如 get 接口,因此就没有再继续完善 post 接口。 youdao_get.py 也可以处理小段文字,方译质量相对较高。所以可以考虑使用 youdao_get.py。

好的 感谢回复 现在跟google翻译一起用~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants