Opened 12 years ago

Last modified 3 years ago

#2170 new bug

WebUI generates AttributeError when reconnected to daemon

Reported by: Cas Owned by: damoxc
Priority: trivial Milestone: 2.x
Component: Web UI Version: 1.3.5
Keywords: Cc:

Description

To reproduce:

  • Open browser with webui and select a torrent.
  • Kill deluged
  • Start deluged
  • The webui will generate the following error in logs:
[ERROR   ] 15:33:47 json_api:229 'NoneType' object has no attribute 'call'
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/deluge/ui/web/json_api.py", line 220, in _handle_request
    result = self._exec_local(method, params, request)
  File "/usr/lib/python2.7/dist-packages/deluge/ui/web/json_api.py", line 187, in _exec_local
    return meth(*params)
  File "/usr/lib/python2.7/dist-packages/deluge/ui/web/json_api.py", line 618, in get_torrent_status
    return component.get("SessionProxy").get_torrent_status(torrent_id, keys)
  File "/usr/lib/python2.7/dist-packages/deluge/ui/sessionproxy.py", line 148, in get_torrent_status
    d = client.core.get_torrent_status(torrent_id, keys, True)
  File "/usr/lib/python2.7/dist-packages/deluge/ui/client.py", line 508, in __call__
    return self.daemon.call(self.base, *args, **kwargs)
AttributeError: 'NoneType' object has no attribute 'call'

The is due to a delayed get_torrent_status call to not yet created daemon in client.py.

It is a trivial issue and simply generates unnecessary log messages.

Change History (4)

comment:1 Changed 11 years ago by Cas

  • Milestone changed from 1.3.6 to 1.3.x
  • Summary changed from WebUI generates AttributeError: 'NoneType' object has no attribute 'call' when reconnected to daemon to WebUI generates AttributeError when reconnected to daemon

comment:2 Changed 8 years ago by Cas

  • Milestone changed from 1.3.x to 2.0.x

comment:3 Changed 7 years ago by Cas

  • Milestone changed from 2.0.x to 2.x

Milestone renamed

comment:4 Changed 3 years ago by danger89

Selecting a torrent also give me this fatal error...

13:16:05 [ERROR   ][deluge.ui.web.json_api     :168 ] Error calling method `web.get_torrent_status`: 'NoneType' object has no attribute 'call'
13:16:05 [ERROR   ][deluge.ui.web.json_api     :1343] 'NoneType' object has no attribute 'call'
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 640, in get_torrent_status
    d = component.get('SessionProxy').get_torrent_status(torrent_id, keys)
  File "/usr/lib/python3/dist-packages/deluge/ui/sessionproxy.py", line 159, in get_torrent_status
    d = client.core.get_torrent_status(torrent_id, keys, True)
  File "/usr/lib/python3/dist-packages/deluge/ui/client.py", line 551, in __call__
    return self.daemon.call(self.base, *args, **kwargs)
AttributeError: 'NoneType' object has no attribute 'call'

Help again!?

Note: See TracTickets for help on using tickets.