Hello there,

I have this weird problem with a mod_python application.

Recently I installed ElementTree and cElementTree through ez_setup.py, 
even though they were already installed normally (this might not be too 
smart, but I don't think it's related to my actual problem).

I have a web application written on top of mod_python that uses 
cElementTree for several things. After installing cElementTree through 
ez_setup.py, it turns out that I got this Exception on the site:

(most relevant info at the end, obviously, it's quite lengthy)

Mod_python error: "PythonHandler equilex"

Traceback (most recent call last):

   File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 
287, in HandlerDispatch
     log=debug)

   File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 
464, in import_module
     module = imp.load_module(mname, f, p, d)

   File "/var/www/equilex.eu/http/equilex/__init__.py", line 2, in ?
     from equilex.model import Session

   File "/var/www/equilex.eu/http/equilex/model/__init__.py", line 4, in ?
     from page import Page

   File "/var/www/equilex.eu/http/equilex/model/page.py", line 1, in ?
     from menu import Menu

   File "/var/www/equilex.eu/http/equilex/model/menu.py", line 1, in ?
     import cElementTree as et

   File "build/bdist.linux-i686/egg/cElementTree.py", line 7, in ?

   File "build/bdist.linux-i686/egg/cElementTree.py", line 4, in 
__bootstrap__

   File 
"/usr/lib/python2.4/site-packages/setuptools-0.6b2-py2.4.egg/pkg_resources.py", 
line 799, in resource_filename
     return get_provider(package_or_requirement).get_resource_filename(

   File 
"/usr/lib/python2.4/site-packages/setuptools-0.6b2-py2.4.egg/pkg_resources.py", 
line 1228, in get_resource_filename
     self._extract_resource(manager, self._eager_to_zip(name))

   File 
"/usr/lib/python2.4/site-packages/setuptools-0.6b2-py2.4.egg/pkg_resources.py", 
line 1249, in _extract_resource
     real_path = manager.get_cache_path(

   File 
"/usr/lib/python2.4/site-packages/setuptools-0.6b2-py2.4.egg/pkg_resources.py", 
line 880, in get_cache_path
     self.extraction_error()

   File 
"/usr/lib/python2.4/site-packages/setuptools-0.6b2-py2.4.egg/pkg_resources.py", 
line 846, 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 13] Permission denied: '/var/www/.python-eggs'

The Python egg cache directory is currently set to:

   /var/www/.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.

Now, I already had a /tmp/eggs dir for eggs, and I had a SetEnv 
directive in my vhost config for my Trac vhost (which uses eggs). So I 
moved the SetEnv directive from the vhost config to my global 
httpd.conf. Curious enough, after restarting apache2, I still got the 
same error!! Is there any reason why it may not be picking up the env 
variable that points it to the other directory?

Regards,

Manuzhai

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to