Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#2834 closed bug (WontFix)


Reported by: kendokan Owned by:
Priority: minor Milestone: not applicable
Component: Web UI Version: 1.3.12
Keywords: web-ui plugins label freebsd Cc:


Plugins fail to load in web-ui on FreeBSD package "deluge-1.3.12,1" due to an inability to write to the default Python egg cache directory. This directory does not exist in the default installation, nor is there a documented dependency. Most visibly for me, this breaks labels in web-ui; you can't create them or assign torrents to them.

Creating a directory (I used "/usr/local/etc/deluge/.python-eggs") and adding export PYTHON_EGG_CACHE="/usr/local/etc/deluge/.python-eggs" to /usr/local/etc/rc.d/deluge_web resolved the issue.

[ERROR   ] 10:23:49 pluginmanagerbase:146 Unable to instantiate plugin!
[ERROR   ] 10:23:49 pluginmanagerbase:147 Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg

  [Errno 13] Permission denied: '/.python-eggs'

The Python egg cache directory is currently set to:


Perhaps your account does not have write access to this directory?  You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/deluge/", line 144, in enable_plugin
    instance = cls(plugin_name.replace("-", "_"))
  File "/usr/local/lib/python2.7/site-packages/deluge/plugins/Extractor-0.4-py2.7.egg/extractor/", line 56, in __init__
    from webui import WebUI as _plugin_cls
  File "/usr/local/lib/python2.7/site-packages/deluge/plugins/Extractor-0.4-py2.7.egg/extractor/", line 47, in <module>
  File "/usr/local/lib/python2.7/site-packages/deluge/plugins/Extractor-0.4-py2.7.egg/extractor/", line 54, in WebUI
  File "/usr/local/lib/python2.7/site-packages/deluge/plugins/Extractor-0.4-py2.7.egg/extractor/", line 38, in get_resource
    return pkg_resources.resource_filename("extractor", os.path.join("data", filename))
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/", line 1150, in resource_filename
    self, resource_name
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/", line 1863, in get_resource_filename
    return self._extract_resource(manager, zip_path)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/", line 1892, in _extract_resource
    self.egg_name, self._parts(zip_path)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/", line 1217, in get_cache_path
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/", line 1197, in extraction_error
    raise err
ExtractionError: Can't extract file(s) to egg cache

Change History (5)

comment:1 Changed 8 years ago by Cas

  • Milestone changed from needs verified to not applicable
  • Resolution set to WontFix
  • Status changed from new to closed

Sorry but that is not to do with Deluge, it's a system python setup issue so nothing for us to fix.

comment:2 Changed 8 years ago by kendokan

Since it is a required dependency, shouldn't the init script at least check that the egg cache directory is writable and fail if it isn't? Also, you seem to be addressing this issue for at least OpenSUSE, so why not FreeBSD?

comment:3 Changed 8 years ago by Cas

That script in particular were user contributed and are obsolete, OpenSUSE uses the generic systemd scripts. Setting up python environment variables in an init script doesn't seem correct at all.

You are the only FreeBSD user (in fact any user) to have reported this issue so I would check with FreeBSD what is the actual correct setup as it is a dependency of Python not Deluge.

Last edited 8 years ago by Cas (previous) (diff)

comment:4 Changed 8 years ago by kendokan

I found this reference from a few years ago at, along with a handful of other posts around the 'net referencing plugin troubles without clear solutions. But, I do recognize your assessment that setting the environment is outside your scope.

I am now instead suggesting deluge_web perform a simple validation check of the environment before continuing. Without at least that, the web-ui will happily start, but plugins will be broken.

These three lines could be inserted into the init script in the deluge_web_prestart() section:

if [ ! -w "${PYTHON_EGG_CACHE}" ] ; then
        err 1 "Python egg cache directory does not exist or is not writable"

comment:5 Changed 8 years ago by kendokan

Eh, ok I realize my solution is a bad idea, disregard. Would still be great if it failed more visibly, but perhaps this post will eventually help others anyway. Thanks much for taking a look.

Note: See TracTickets for help on using tickets.