kstep / ajenti-transmission

Transmission plugin for Ajenti
2 stars 0 forks source link

Crash after upload torrent file to download #2

Closed DjustinK closed 10 years ago

DjustinK commented 10 years ago
HTTPConnectionPool(host='127.0.0.1', port=9091): Max retries exceeded with url: /transmission/rpc (Caused by <class 'socket.error'>: [Errno 111] Connection refused)
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/ajenti/plugins/main/main.py", line 158, in handle_message
    self.ui.dispatch_event(update['uid'], update['event'], update['params'])
  File "/usr/lib/pymodules/python2.7/ajenti/ui/__init__.py", line 72, in dispatch_event
    self.root.dispatch_event(uid, event, params)
  File "/usr/lib/pymodules/python2.7/ajenti/ui/element.py", line 382, in dispatch_event
    if child.dispatch_event(uid, event, params):
  File "/usr/lib/pymodules/python2.7/ajenti/ui/element.py", line 382, in dispatch_event
    if child.dispatch_event(uid, event, params):
  File "/usr/lib/pymodules/python2.7/ajenti/ui/element.py", line 388, in dispatch_event
    getattr(self, k)(**(params or {}))
  File "/var/lib/ajenti/plugins/transmission/main.py", line 312, in submit_add_dialog
    added_torrent = self._client.torrent_add(**options)
  File "/var/lib/ajenti/plugins/transmission/client.py", line 66, in <lambda>
    method = (lambda self, **kwargs: self._do_request(name, self._fix_arg_keys(kwargs))).__get__(self, self.__class__)
  File "/var/lib/ajenti/plugins/transmission/client.py", line 91, in _do_request
    result = self._session.post(self._base_url, data=json.dumps(data), headers=headers)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 425, in post
    return self.request('POST', url, data=data, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 383, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 486, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 378, in send
    raise ConnectionError(e)
ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=9091): Max retries exceeded with url: /transmission/rpc (Caused by <class 'socket.error'>: [Errno 111] Connection refused)
kstep commented 10 years ago

Seems like you have your Transmission daemon is either not running, or it's port closed, or the daemon is listening on some other address/port. Configure plugin first to connect to correct endpoint.

kstep commented 10 years ago

And please, please, read https://guides.github.com/features/mastering-markdown/ and surround your code with ```.

kstep commented 10 years ago

As far as I can see, everything I can do to fix it, is catch the exception and redirect user to configuration panel in such cases. I will look into it when I have spare time. Thank you for reporting.

kstep commented 10 years ago

Sorry it took so long, as I said I have little time to spend on my hobby projects. Please try latest version from master branch to check out if it works for you. If the last commit doesn't fix the problem, feel free to reopen the issue.