The standalone tracd server starts but crashes and displays the following: Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/trac/web/api.py", line 339, in send_error 'text/html') File "/usr/lib/python2.5/site-packages/trac/web/chrome.py", line 683, in render_template template = self.load_template(filename, method=method) File "/usr/lib/python2.5/site-packages/trac/web/chrome.py", line 659, in load_template self.templates = TemplateLoader(self.get_all_templates_dirs(), File "/usr/lib/python2.5/site-packages/trac/web/chrome.py", line 406, in get_all_templates_dirs dirs += provider.get_templates_dirs() File "build/bdist.linux-i686/egg/timingandestimationplugin/webui.py", line 118, in get_templates_dirs rtn = [resource_filename(__name__, 'templates')] File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 841, in resource_filename self, resource_name File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1311, in get_resource_filename return self._extract_resource(manager, zip_path) File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1318, in _extract_resource manager, os.path.join(zip_path, name) File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1332, in _extract_resource self.egg_name, self._parts(zip_path) File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 921, in get_cache_path self.extraction_error() File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 887, in extraction_error raise err ExtractionError: Can't extract file(s) to egg cache The following error occurred while trying to extract file(s) to the Python egg cache: [Errno 20] Not a directory: '/dev/null/.python-eggs' The Python egg cache directory is currently set to: /dev/null/.python-eggs 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. Reproducible: Always Steps to Reproduce: 1. Start using /etc/init.d/tracd 2. Open the browser and open http://localhost:8000 This happens because the PYTHON_EGG_CACHE environment variable defaults to the users homedir and tracd runs as the user tracd with the homedir /dev/null
Created attachment 164429 [details, diff] Explicitly sets the PYTHON_EGG_CACHE environment variable This patch works for me but I'm not sure if it is a good idea to set PYTHON_EGG_CACHE to /tmp
Created attachment 164431 [details, diff] Explicitly sets the PYTHON_EGG_CACHE environment variable Correct patch
Thanks for the patch, assigning to maintainers.
Thanks for the report. Let's rather use a separate directory for this. Does trac-0.11.1-r1 fix the issue for you?
Almost, the egg-cache directory must be writable by the tracd user so I had to run "chown tracd:tracd /var/lib/trac/egg-cache".
Thanks for the feedback! Hopefully fixed now :)