rachmadaniHaryono / we-get

:icecream: Command-line tool for searching torrents.
MIT License
153 stars 26 forks source link

yts module connection refused cause entire search to fail #16

Open oblitum opened 4 years ago

oblitum commented 4 years ago
❯ we-get -s 'Homem+Aranha'
Traceback (most recent call last):ay' ...
  File "/usr/lib/python3.7/urllib/request.py", line 1317, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/usr/lib/python3.7/http/client.py", line 1244, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1290, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1239, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1026, in _send_output
    self.send(msg)
  File "/usr/lib/python3.7/http/client.py", line 966, in send
    self.connect()
  File "/usr/lib/python3.7/http/client.py", line 938, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/lib/python3.7/socket.py", line 727, in create_connection
    raise err
  File "/usr/lib/python3.7/socket.py", line 716, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/we-get", line 11, in <module>
    load_entry_point('we-get==1.1.0', 'console_scripts', 'we-get')()
  File "/usr/lib/python3.7/site-packages/we_get/__init__.py", line 14, in main
    we_get.start()
  File "/usr/lib/python3.7/site-packages/we_get/core/we_get.py", line 237, in start
    sel.run()
  File "/usr/lib/python3.7/site-packages/we_get/core/we_get.py", line 158, in run
    items = run.main(self.pargs)
  File "/usr/lib/python3.7/site-packages/we_get/modules/yts.py", line 83, in main
    return run.search()
  File "/usr/lib/python3.7/site-packages/we_get/modules/yts.py", line 46, in search
    data = json.loads(self.module.http_get_request(url))
  File "/usr/lib/python3.7/site-packages/we_get/core/module.py", line 24, in http_get_request
    return opener.open(url).read().decode()
  File "/usr/lib/python3.7/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/usr/lib/python3.7/urllib/request.py", line 543, in _open
    '_open', req)
  File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 1345, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/usr/lib/python3.7/urllib/request.py", line 1319, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 111] Connection refused>
oblitum commented 4 years ago

Possibly #13 is a solution for this

oblitum commented 4 years ago

Possibly #13 is a solution for this

Actually no, it didn't help.