Opened 11 years ago
Closed 11 years ago
#2355 closed bug (Fixed)
Twisted 13.1 incompatible?
Reported by: | Dan | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.3.7 |
Component: | Unknown | Version: | master |
Keywords: | Cc: | cb47492@gmail.com |
Description
Just upgraded to the latest Twisted (13.1) and downloading blocklists now hangs. I looked at the output, and there is a Traceback in some twisted files; I don't have the output anymore as I downgraded for functionality, but I remember at the end:
'module' object has no method _parse
To make matters worse, this causes everything else in Deluge to freeze, torrents appear paused, and I can't close the process without killing it.
Using Arch Linux 32-bit, Deluge 1.3.6, upgraded from Twisted 13.0 to 13.1
Attachments (1)
Change History (12)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
I am having the exact same problem with Blocklist and twisted 13.1, apparently. I am getting almost exactly the same error message. My error message is exactly the same past the <exception caught here> line.
Downgrading to twisted 13.0 like the reporter suggested fixed the problem, as does disabling the Blocklist plugin. Only when actively telling (including setting the plugin to import on program start) the plugin to download and/or import a list (local or remote) does the problem occur.
Like the reporter, I am using Arch Linux i686, Deluge 1.3.6, and upgraded Twisted 13.0 to 13.1.
comment:3 by , 11 years ago
I am also having this problem and downgrading to Twisted 13.0 also solved the problem for me.
The error I get is mostly, but not entirely the same:
Unhandled error in Deferred: Unhandled Error Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/deluge/plugins/init.py", line 48, in enable self.plugin.enable() File "/usr/lib/python2.7/site-packages/deluge/plugins/Blocklist-1.2-py2.7.egg/blocklist/core.py", line 116, in enable File "/usr/lib/python2.7/site-packages/twisted/internet/task.py", line 173, in start self() File "/usr/lib/python2.7/site-packages/twisted/internet/task.py", line 218, in __call__ d = defer.maybeDeferred(self.f, *self.a, **self.kw) --- <exception caught here> --- File "/usr/lib/python2.7/site-packages/twisted/internet/defer.py", line 137, in maybeDeferred result = f(*args, **kw) File "/usr/lib/python2.7/site-packages/deluge/plugins/Blocklist-1.2-py2.7.egg/blocklist/core.py", line 151, in check_import File "/usr/lib/python2.7/site-packages/deluge/plugins/Blocklist-1.2-py2.7.egg/blocklist/core.py", line 260, in download_list File "/usr/lib/python2.7/site-packages/deluge/httpdownloader.py", line 195, in download_file scheme, host, port, path = client._parse(url) exceptions.AttributeError: 'module' object has no attribute '_parse'
I started a thread on the problem here: http://forum.deluge-torrent.org/viewtopic.php?f=9&t=44885&p=187595.
And there's a bug report for Arch on it here: https://bugs.archlinux.org/task/36298
comment:4 by , 11 years ago
Cc: | added |
---|
follow-up: 6 comment:5 by , 11 years ago
Sorry, this is my first time doing one of these, but if it helps at all, this bug appears to affect any action that requires downloading a file (including trying to download a torrent file) and can be fixed by changing the lines from:
deluge-1.3.6\deluge\httpdownloader.py
41 : import os.path 42 : import zlib ... 195: scheme, host, port, path = client._parse(url) 196: factory = HTTPDownloader(url, filename, callback, headers, force_filename, allow_compression) 197: if scheme == "https":
to something like:
deluge-1.3.6\deluge\httpdownloader.py
41 : import os.path 42 : import zlib xxx: import urlparse ... xxx: parsed = urlparse(url) xxx: scheme, host= parsed[:2] xxx: port = parsed.port or (443 if scheme == 'https' else 80) xxx: path = parsed.path or '/' 196: factory = HTTPDownloader(url, filename, callback, headers, force_filename, allow_compression) 197: if scheme == "https":
which should perform identically to the now defunct twisted.web.client._parse()
comment:6 by , 11 years ago
...oops...the new import line should be:
... xxx: from urlparse import urlparse ...
...awkward...
comment:8 by , 11 years ago
Milestone: | Future → 1.3.7 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
The fix is already applied to our codebase: 06ee112344f7
comment:9 by , 11 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Version: | 1.3.6 → master (git branch) |
The upstream fix does not work as the import is incorrect and 'uri.originFrom' doesn't exist. I attached a patch which fixes both issues.
by , 11 years ago
Attachment: | 0001-Fix-twisted-13.1-compat.patch added |
---|
comment:11 by , 11 years ago
Resolution: | → Fixed |
---|---|
Status: | reopened → closed |
Output: