mdevaev / emonoda

A set of tools to organize and manage your torrents
GNU General Public License v3.0
93 stars 13 forks source link

qbittorrent #64

Open Skyline404 opened 3 years ago

Skyline404 commented 3 years ago

Никак не хочет дружить с qbt

  File "/usr/lib/python3.8/urllib/request.py", line 1350, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/usr/lib/python3.8/http/client.py", line 1255, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1301, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1250, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1010, in _send_output
    self.send(msg)
  File "/usr/lib/python3.8/http/client.py", line 950, in send
    self.connect()
  File "/usr/lib/python3.8/http/client.py", line 921, in connect
    self.sock = self._create_connection(
  File "/usr/lib/python3.8/socket.py", line 808, in create_connection
    raise err
  File "/usr/lib/python3.8/socket.py", line 796, 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 "/home/user/.local/bin/emupdate", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.8/site-packages/emonoda/apps/__init__.py", line 161, in wrap
    method()
  File "/home/user/.local/lib/python3.8/site-packages/emonoda/apps/emupdate.py", line 488, in main
    update(
  File "/home/user/.local/lib/python3.8/site-packages/emonoda/apps/emupdate.py", line 360, in update
    hashes = (client.get_hashes() if client is not None else [])
  File "/home/user/.local/lib/python3.8/site-packages/emonoda/plugins/clients/qbittorrent.py", line 137, in get_hashes
    for item in json.loads(self.__get("/query/torrents"))
  File "/home/user/.local/lib/python3.8/site-packages/emonoda/plugins/clients/qbittorrent.py", line 180, in __get
    return self.__read_handle(path).decode("utf-8")
  File "/home/user/.local/lib/python3.8/site-packages/emonoda/plugins/clients/qbittorrent.py", line 209, in __read_handle
    return web.read_url(
  File "/home/user/.local/lib/python3.8/site-packages/emonoda/web/__init__.py", line 87, in read_url
    return opener.open(request, timeout=timeout).read()
  File "/usr/lib/python3.8/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 1379, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/usr/lib/python3.8/urllib/request.py", line 1353, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 111] Connection refused>
mdevaev commented 3 years ago

Может вы указали неправильный URL? Это явно какая-то ошибка адреса.

Skyline404 commented 3 years ago

С наступившим вас ) урл дефолтный, порт 8008

mdevaev commented 3 years ago

Разве не 8080?

Skyline404 commented 3 years ago

Из вики: "Соединение выполняется по урлу, задаваемому параметром client/url, по умолчанию - http://localhost:8008"

При 8080 такие ошибки:

Traceback (most recent call last):
  File "/home/user/.local/bin/emupdate", line 9, in <module>
    main()
  File "/home/user/.local/lib/python3.9/site-packages/emonoda/apps/__init__.py", line 161, in wrap
    method()
  File "/home/user/.local/lib/python3.9/site-packages/emonoda/apps/emupdate.py", line 488, in main
    update(
  File "/home/user/.local/lib/python3.9/site-packages/emonoda/apps/emupdate.py", line 360, in update
    hashes = (client.get_hashes() if client is not None else [])
  File "/home/user/.local/lib/python3.9/site-packages/emonoda/plugins/clients/qbittorrent.py", line 137, in get_hashes
    for item in json.loads(self.__get("/query/torrents"))
  File "/home/user/.local/lib/python3.9/site-packages/emonoda/plugins/clients/qbittorrent.py", line 180, in __get
    return self.__read_handle(path).decode("utf-8")
  File "/home/user/.local/lib/python3.9/site-packages/emonoda/plugins/clients/qbittorrent.py", line 209, in __read_handle
    return web.read_url(
  File "/home/user/.local/lib/python3.9/site-packages/emonoda/web/__init__.py", line 87, in read_url
    return opener.open(request, timeout=timeout).read()
  File "/usr/lib/python3.9/urllib/request.py", line 523, in open
    response = meth(req, response)
  File "/usr/lib/python3.9/urllib/request.py", line 632, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.9/urllib/request.py", line 561, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 641, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
mdevaev commented 3 years ago

На вики опечатка. При 8080 он хотя бы соединяется, почему до урла дойти не может - это уже другой вопрос.

YurikaL commented 3 years ago

А попробуйте написать в конфиге URL без указания протокола, то есть без http://. Почти наугад, но вдруг поможет!