Giter Club home page Giter Club logo

gd_plugin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gd_plugin's Issues

IndexError: list index out of range

环境为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

dist下youdao_get 翻译 带有 / 的内容报错

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

youdao_post.py 报错不能正常使用

系统 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

是不是对 / 的处理还是有些问题?

运行报错

image
hello.py里是youdao_get.py的代码 在shell命令行测试运行是成功的

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.