easeflyer / gd_plugin Goto Github PK
View Code? Open in Web Editor NEW可能是最好用的Linux 屏幕取词工具。完美取词,支持全文翻译,在线英语词典。翻译引擎采用有道。
可能是最好用的Linux 屏幕取词工具。完美取词,支持全文翻译,在线英语词典。翻译引擎采用有道。
环境为python 3.5 youdao_get和youdao_post两个文件运行都会有
Traceback (most recent call last):
File "youdao_get.py", line 38, in
word = argv[1]
IndexError: list index out of range
youdao_get.py yd_get.py都没有任何问题, dist/youdao_get则报错,不清楚为什么,反馈一下
系统ubuntu 21.10
下面的 a/b 是带有/的内容,用youdao_get.py yd_get.py都没有任何问题
$ dist/youdao_get 'a/b'
Traceback (most recent call last):
File "youdao_get.py", line 39, in <module>
word = word.replace("/", "/") # url 方式要过滤掉 / 换成全角
File "urllib/request.py", line 163, in urlopen
File "urllib/request.py", line 472, in open
File "urllib/request.py", line 582, in http_response
File "urllib/request.py", line 510, in error
File "urllib/request.py", line 444, in _call_chain
File "urllib/request.py", line 590, in http_error_default
urllib.error.HTTPError: HTTP Error 404: Not Found
[20681] Failed to execute script youdao_get
系统 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'
只要包含 / 字符,翻译都会报错。例如这段
This implementation is designed to allow the end user to move in a city to obtain additional content related to the surrounding environment (monuments, objects, etc.) by using smartphones and/or VR/AR/MR-like devices
报错内容:
查询错误:程序返回,退出代码为 255. [16126] Failed to execute script youdao_get Traceback (most recent call last): File "youdao_get.py", line 39, in File "urllib/request.py", line 163, in urlopen File "urllib/request.py", line 472, in open File "urllib/request.py", line 582, in http_response File "urllib/request.py", line 510, in error File "urllib/request.py", line 444, in _call_chain File "urllib/request.py", line 590, in http_error_default urllib.error.HTTPError: HTTP Error 404: Not Found
是不是对 / 的处理还是有些问题?
我只安装了goldendict,感觉用不了。不知道是不是还要安装有道才能用。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.