#2737 closed bug (Fixed)
[Blocklist] ImportError: cannot import name _URI
Reported by: | cb474 | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.3.12 |
Component: | Core | Version: | 1.3.11 |
Keywords: | Cc: |
Description
Recently Deluge is no longer capable of downloading the blocklist I use. I checked the url and I can download it fine through a browser (http://list.iblocklist.com/?list=ydxerpxkpcfqjaybcssw&fileformat=p2p&archiveformat=gz).
If I delete the URL in the blocklist settings, Deluge will import the old cached blocklist without problem, it just won't download updates.
When launching from a terminal, I get this error:
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.3-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 140, in maybeDeferred result = f(*args, **kw) File "/usr/lib/python2.7/site-packages/deluge/plugins/Blocklist-1.3-py2.7.egg/blocklist/core.py", line 151, in check_import File "/usr/lib/python2.7/site-packages/deluge/plugins/Blocklist-1.3-py2.7.egg/blocklist/core.py", line 260, in download_list File "/usr/lib/python2.7/site-packages/deluge/httpdownloader.py", line 199, in download_file from twisted.web.client import _URI exceptions.ImportError: cannot import name _URI
I also get this warning, even with no URL entered for the blocklist, which then precludes the above error (and I continue to get this warning even after I installed the python-service-identity package in my distro):
:0: UserWarning: You do not have a working installation of the service_identity module: 'No module named service_identity'. Please install it from <https://pypi.python.org/pypi/service_identity> and make sure all of its dependencies are satisfied. Without the service_identity module and a recent enough pyOpenSSL to support it, Twisted can perform only rudimentary TLS client hostname verification. Many valid certificate/hostname mappings may be rejected. /usr/lib/python2.7/site-packages/deluge/ui/gtkui/listview.py:250: GtkWarning: gtk_tree_model_sort_set_sort_column_id: assertion 'header != NULL' failed self.treeview.get_model().set_sort_column_id(column_state.sort, column_state.sort_order)
I running Deluge in Manjaro (i.e. Arch) Linux.
Change History (5)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Just for the heck of it, I tried installing deluge-git, from the Arch AUR repository. The version number is listed as, 2.0.0.dev379-1.
If I launch Deluge 2.0 without a URL in the blocklist settings, it fails to import the cached blocklist and I get these errors:
20:25:48.643 [ERROR ][deluge.plugins.blocklist.core :414 ] Failed to read!!!!!! 20:25:48.643 [ERROR ][deluge.plugins.blocklist.core :1193] [Failure instance: Traceback: <type 'exceptions.TypeError'>: coercing to Unicode: need string or buffer, NoneType found /usr/lib/python2.7/threading.py:783:__bootstrap /usr/lib/python2.7/threading.py:810:__bootstrap_inner /usr/lib/python2.7/threading.py:763:run --- <exception caught here> --- /usr/lib/python2.7/site-packages/twisted/python/threadpool.py:196:_worker /usr/lib/python2.7/site-packages/twisted/python/context.py:118:callWithContext /usr/lib/python2.7/site-packages/twisted/python/context.py:81:callWithContext build/bdist.linux-x86_64/egg/deluge/plugins/blocklist/readers.py:38:read build/bdist.linux-x86_64/egg/deluge/plugins/blocklist/readers.py:71:readranges build/bdist.linux-x86_64/egg/deluge/plugins/blocklist/decompressers.py:33:open /usr/lib/python2.7/gzip.py:34:open /usr/lib/python2.7/gzip.py:94:__init__ ] None 20:25:48.647 [ERROR ][twisted :455 ] Unhandled error in Deferred: Unhandled error in Deferred: 20:25:48.649 [ERROR ][twisted :455 ] Unhandled Error Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 783, in __bootstrap self.__bootstrap_inner() File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 763, in run self.__target(*self.__args, **self.__kwargs) --- <exception caught here> --- File "/usr/lib/python2.7/site-packages/twisted/python/threadpool.py", line 196, in _worker result = context.call(ctx, function, *args, **kwargs) File "/usr/lib/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/lib/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext return func(*args,**kw) File "/usr/lib/python2.7/shutil.py", line 119, in copy copyfile(src, dst) File "/usr/lib/python2.7/shutil.py", line 68, in copyfile if _samefile(src, dst): File "/usr/lib/python2.7/shutil.py", line 58, in _samefile return os.path.samefile(src, dst) File "/usr/lib/python2.7/posixpath.py", line 162, in samefile s1 = os.stat(f1) exceptions.TypeError: coercing to Unicode: need string or buffer, NoneType found Unhandled Error Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 783, in __bootstrap self.__bootstrap_inner() File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 763, in run self.__target(*self.__args, **self.__kwargs) --- <exception caught here> --- File "/usr/lib/python2.7/site-packages/twisted/python/threadpool.py", line 196, in _worker result = context.call(ctx, function, *args, **kwargs) File "/usr/lib/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/lib/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext return func(*args,**kw) File "/usr/lib/python2.7/shutil.py", line 119, in copy copyfile(src, dst) File "/usr/lib/python2.7/shutil.py", line 68, in copyfile if _samefile(src, dst): File "/usr/lib/python2.7/shutil.py", line 58, in _samefile return os.path.samefile(src, dst) File "/usr/lib/python2.7/posixpath.py", line 162, in samefile s1 = os.stat(f1) exceptions.TypeError: coercing to Unicode: need string or buffer, NoneType found 20:27:07.737 [ERROR ][deluge.plugins.blocklist.core :414 ] Failed to read!!!!!! 20:27:07.738 [ERROR ][deluge.plugins.blocklist.core :1193] [Failure instance: Traceback: <type 'exceptions.TypeError'>: coercing to Unicode: need string or buffer, NoneType found /usr/lib/python2.7/threading.py:783:__bootstrap /usr/lib/python2.7/threading.py:810:__bootstrap_inner /usr/lib/python2.7/threading.py:763:run --- <exception caught here> --- /usr/lib/python2.7/site-packages/twisted/python/threadpool.py:196:_worker /usr/lib/python2.7/site-packages/twisted/python/context.py:118:callWithContext /usr/lib/python2.7/site-packages/twisted/python/context.py:81:callWithContext build/bdist.linux-x86_64/egg/deluge/plugins/blocklist/readers.py:38:read build/bdist.linux-x86_64/egg/deluge/plugins/blocklist/readers.py:71:readranges build/bdist.linux-x86_64/egg/deluge/plugins/blocklist/decompressers.py:33:open /usr/lib/python2.7/gzip.py:34:open /usr/lib/python2.7/gzip.py:94:__init__ ] None 20:27:07.740 [ERROR ][twisted :455 ] Unhandled error in Deferred: Unhandled error in Deferred: 20:27:07.740 [ERROR ][twisted :455 ] Unhandled Error Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 783, in __bootstrap self.__bootstrap_inner() File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 763, in run self.__target(*self.__args, **self.__kwargs) --- <exception caught here> --- File "/usr/lib/python2.7/site-packages/twisted/python/threadpool.py", line 196, in _worker result = context.call(ctx, function, *args, **kwargs) File "/usr/lib/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/lib/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext return func(*args,**kw) File "/usr/lib/python2.7/shutil.py", line 119, in copy copyfile(src, dst) File "/usr/lib/python2.7/shutil.py", line 68, in copyfile if _samefile(src, dst): File "/usr/lib/python2.7/shutil.py", line 58, in _samefile return os.path.samefile(src, dst) File "/usr/lib/python2.7/posixpath.py", line 162, in samefile s1 = os.stat(f1) exceptions.TypeError: coercing to Unicode: need string or buffer, NoneType found Unhandled Error Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 783, in __bootstrap self.__bootstrap_inner() File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 763, in run self.__target(*self.__args, **self.__kwargs) --- <exception caught here> --- File "/usr/lib/python2.7/site-packages/twisted/python/threadpool.py", line 196, in _worker result = context.call(ctx, function, *args, **kwargs) File "/usr/lib/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/lib/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext return func(*args,**kw) File "/usr/lib/python2.7/shutil.py", line 119, in copy copyfile(src, dst) File "/usr/lib/python2.7/shutil.py", line 68, in copyfile if _samefile(src, dst): File "/usr/lib/python2.7/shutil.py", line 58, in _samefile return os.path.samefile(src, dst) File "/usr/lib/python2.7/posixpath.py", line 162, in samefile s1 = os.stat(f1) exceptions.TypeError: coercing to Unicode: need string or buffer, NoneType found Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/deluge/ui/gtkui/mainwindow.py", line 305, in on_expose_event component.get("SystemTray").blink(False) File "/usr/lib/python2.7/site-packages/deluge/component.py", line 430, in get return _ComponentRegistry.components[name] KeyError: 'SystemTray'
If I set a URL in the blocklist settings, it does not download an import the blocklist and I get these errors:
20:27:32.355 [ERROR ][twisted :455 ] Unhandled error in Deferred: Unhandled error in Deferred: 20:27:32.358 [ERROR ][twisted :455 ] Unhandled Error Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/deluge/plugins/init.py", line 26, in enable self.plugin.enable() File "build/bdist.linux-x86_64/egg/deluge/plugins/blocklist/core.py", line 100, 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 140, in maybeDeferred result = f(*args, **kw) File "build/bdist.linux-x86_64/egg/deluge/plugins/blocklist/core.py", line 139, in check_import File "build/bdist.linux-x86_64/egg/deluge/plugins/blocklist/core.py", line 311, in download_list File "/usr/lib/python2.7/site-packages/deluge/httpdownloader.py", line 182, in download_file from twisted.web.client import _URI exceptions.ImportError: cannot import name _URI Unhandled Error Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/deluge/plugins/init.py", line 26, in enable self.plugin.enable() File "build/bdist.linux-x86_64/egg/deluge/plugins/blocklist/core.py", line 100, 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 140, in maybeDeferred result = f(*args, **kw) File "build/bdist.linux-x86_64/egg/deluge/plugins/blocklist/core.py", line 139, in check_import File "build/bdist.linux-x86_64/egg/deluge/plugins/blocklist/core.py", line 311, in download_list File "/usr/lib/python2.7/site-packages/deluge/httpdownloader.py", line 182, in download_file from twisted.web.client import _URI exceptions.ImportError: cannot import name _URI Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/deluge/ui/gtkui/mainwindow.py", line 305, in on_expose_event component.get("SystemTray").blink(False) File "/usr/lib/python2.7/site-packages/deluge/component.py", line 430, in get return _ComponentRegistry.components[name] KeyError: 'SystemTray'
comment:3 by , 10 years ago
Component: | other/unknown → Core |
---|---|
Milestone: | Future → 1.3.12 |
Resolution: | → Fixed |
Status: | new → closed |
Summary: | Fails to download blocklist, "Stuck at Downloading 0.00%" → [Blocklist] ImportError: cannot import name _URI |
Fixed in 1.3-stable [d40dfcd53c243] and develop [2c7bbc6ade23fd0]
comment:4 by , 10 years ago
"Fixed in 1.3-stable" means in 1.3.12?
Thanks, just trying to make sure I'm understanding correctly.
Okay, I realized I need to have python2-service-identity installed, not python-service-identity. This does not resolve the problem with blocklist. But I do not get the other warning now. I do get a different error, in addition to the ImportError.