Coder Social home page Coder Social logo

hujiang_dictionary's People

Contributors

asutorufa avatar dependabot[bot] avatar

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

Watchers

 avatar  avatar

hujiang_dictionary's Issues

function request: expose GetJson(str string) result to command line argument

I want to use this perfect dictionary tool in command line pipe, for example
fzf --preview to show the dictionary search result and using mpv to play the mp3 link at same time. there are many other cases for the need of the meta data of the search result.

As json is standard and popular format, this fuction will expose the power of this dictionary to all the command line world too. it's cool!

网络错误报错 已解决

Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
    six.raise_from(e, None)
  File "<string>", line 2, in raise_from
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
    httplib_response = conn.getresponse()
  File "/data/data/com.termux/files/usr/lib/python3.6/http/client.py", line 1331, in getresponse
    response.begin()
  File "/data/data/com.termux/files/usr/lib/python3.6/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/data/data/com.termux/files/usr/lib/python3.6/http/client.py", line 266, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/requests/adapters.py", line 445, in send
    timeout=timeout
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/util/retry.py", line 357, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/packages/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
    six.raise_from(e, None)
  File "<string>", line 2, in raise_from
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
    httplib_response = conn.getresponse()
  File "/data/data/com.termux/files/usr/lib/python3.6/http/client.py", line 1331, in getresponse
    response.begin()
  File "/data/data/com.termux/files/usr/lib/python3.6/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/data/data/com.termux/files/usr/lib/python3.6/http/client.py", line 266, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/bin/hjjp", line 11, in <module>
    load_entry_point('hjjpcj==0.9.8.6', 'console_scripts', 'hjjp')()
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/hjjp/hjjp.py", line 111, in main
    start(option()[0],option()[1],option()[2])
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/hjjp/hjjp.py", line 30, in start
    tree = lxml.html.fromstring((requests.get(url,headers={'User-Agent':useragent,'Cookie':Cookie})).text)
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/requests/sessions.py", line 512, in request
    resp = self.send(prep, **send_kwargs)
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/requests/sessions.py", line 622, in send
    r = adapter.send(request, **kwargs)
  File "/data/data/com.termux/files/usr/lib/python3.6/site-packages/requests/adapters.py", line 495, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))

未知错误

----------查询单词 kodomo---------
网络连接错误,请检查网络是否连接!
Traceback (most recent call last):
File "/home/asutorufa/.local/bin/hjjp", line 11, in
sys.exit(main())
File "/home/asutorufa/.local/lib/python3.6/site-packages/hjjp/hjjp.py", line 119, in main
start(option()[0],option()[1],option()[2])
File "/home/asutorufa/.local/lib/python3.6/site-packages/hjjp/hjjp.py", line 42, in start
word_prnounces = word_simple(tree)
UnboundLocalError: local variable 'tree' referenced before assignment

UnboundLocalError: local variable 'xxx' referenced before assignment
在函数外部已经定义了变量n,在函数内部对该变量进行运算,运行时会遇到了这样的错误:
主要是因为没有让解释器清楚变量是全局变量还是局部变量

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.