sumisora:
rss: https://share.dmhy.org/topics/rss/rss.xml?team_id=58
accept_all: yes
rtorrent:
uri: scgi://localhost:5000
path: /root/sumisora
2017-02-04 17:03 CRITICAL task sumisora-dmhy BUG: Unhandled error in plugin rtorrent: local variable 'e' referenced before assignment
Traceback (most recent call last):
File "/usr/lib64/python3.5/site-packages/flexget/task.py", line 483, in __run_plugin
return method(*args, **kwargs)
File "/usr/lib64/python3.5/site-packages/flexget/event.py", line 23, in __call__
return self.func(*args, **kwargs)
File "/usr/lib64/python3.5/site-packages/flexget/plugins/clients/rtorrent.py", line 530, in on_task_output
self.add_entry(client, entry, options, start=config['start'], mkdir=config['mkdir'])
File "/usr/lib64/python3.5/site-packages/flexget/plugins/clients/rtorrent.py", line 652, in add_entry
self._verify_load(client, entry['torrent_info_hash'])
File "/usr/lib64/python3.5/site-packages/flexget/plugins/clients/rtorrent.py", line 500, in _verify_load
raise e
UnboundLocalError: local variable 'e' referenced before assignment
def _verify_load(self, client, info_hash):
e = IOError()
for _ in range(0, 5):
try:
return client.torrent(info_hash, fields=['hash'])
except (IOError, xmlrpc_client.Error) as e:
sleep(0.5)
raise e
Expected behaviour:
Torrent get added
Actual behaviour:
flexget crashed
Steps to reproduce:
Config:
Log:
Additional information:
I digged into this issue a bit:
The error is in flexget/plugins/clients/rtorrent.py:500
In python3, e will be deleted. Ref: http://stackoverflow.com/questions/15077506/received-unboundlocalerror-local-variable-e-referenced-before-assignment-wh