#3319: Problem getting host_id info from hostlist
-----------------------+-------------------
  Reporter:  jools772  |      Owner:
      Type:  bug       |     Status:  new
  Priority:  major     |  Milestone:  2.0.4
 Component:  Core      |    Version:  2.0.3
Resolution:            |   Keywords:
-----------------------+-------------------

Old description:

> 12:34:51 [WARNING ][deluge.ui.hostlist         :209 ] Problem getting
> host_id info from hostlist
> 12:34:51 [ERROR   ][deluge.ui.web.json_api     :168 ] Error calling
> method `web.get_host_status`: 'tuple' object has no attribute
> 'addCallback'
> 12:34:51 [ERROR   ][deluge.ui.web.json_api     :1413] 'tuple' object has
> no attribute 'addCallback'
> Traceback (most recent call last):
>   File "/usr/lib/python3/dist-packages/deluge/ui/web/json_api.py", line
> 160, in _handle_request
>     result = self._exec_local(method, params, request)
>   File "/usr/lib/python3/dist-packages/deluge/ui/web/json_api.py", line
> 122, in _exec_local
>     return meth(*params)
>   File "/usr/lib/python3/dist-packages/deluge/ui/web/json_api.py", line
> 797, in get_host_status
>     return self.hostlist.get_host_status(host_id).addCallback(response)
> AttributeError: 'tuple' object has no attribute 'addCallback'

New description:

 {{{
 12:34:51 [WARNING ][deluge.ui.hostlist         :209 ] Problem getting
 host_id info from hostlist
 12:34:51 [ERROR   ][deluge.ui.web.json_api     :168 ] Error calling method
 `web.get_host_status`: 'tuple' object has no attribute 'addCallback'
 12:34:51 [ERROR   ][deluge.ui.web.json_api     :1413] 'tuple' object has
 no attribute 'addCallback'
 Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/deluge/ui/web/json_api.py", line
 160, in _handle_request
     result = self._exec_local(method, params, request)
   File "/usr/lib/python3/dist-packages/deluge/ui/web/json_api.py", line
 122, in _exec_local
     return meth(*params)
   File "/usr/lib/python3/dist-packages/deluge/ui/web/json_api.py", line
 797, in get_host_status
     return self.hostlist.get_host_status(host_id).addCallback(response)
 AttributeError: 'tuple' object has no attribute 'addCallback'

 }}}

--

Comment (by Cas):

 Although the resulting error will need fixed, the warning tells us that it
 is due to the host_id passed in not being correct and cannot be found in
 the `hostlist.conf`. Please check that config value in webui matches one
 in the hostlist.


 The issue in `Hostlist.get_host_status` is it returning a tuple where the
 `json_api` call is expecting a deferred so either have `get_host_status`
 always return deferred (or tuple) or use the `maybeDeferred` method in
 `json_api`.

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3319#comment:1>
Deluge <https://deluge-torrent.org/>
Deluge Project

-- 
You received this message because you are subscribed to the Google Groups 
"Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/deluge-dev/062.ccf73c321f2439aaa4ce2ec842e667eb%40deluge-torrent.org.

Reply via email to