Koozali.org: home of the SME Server

ExtractionError: Can't extract file(s) to egg cache

Offline mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
ExtractionError: Can't extract file(s) to egg cache
« on: May 15, 2007, 06:49:17 PM »
I am writing a How-To for installing Django on SME 7.1.1. If I can succeed with this, I may try my hand at building an rpm for SME.

I have a freshly made server, and have made pretty good progress so far.  The framework is responding; mod_python is working. Still having a couple of problems.

When connecting to mySQLdb via Django framework, I am getting a permissions error; see subject line. Python trace back follows.

Permissions are root:wheel 770 for /.python-eggs in /root/.python-eggs. I assume that is the right location.

Any ideas on how can I resolve this?

 - Mark



Mod_python error: "PythonHandler django.core.handlers.modpython"

Traceback (most recent call last):

  File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 299, in HandlerDispatch
    result = object(req)

  File "/usr/lib/python2.3/site-packages/django/core/handlers/modpython.py", line 177, in handler
    return ModPythonHandler()(req)

  File "/usr/lib/python2.3/site-packages/django/core/handlers/modpython.py", line 145, in __call__
    self.load_middleware()

  File "/usr/lib/python2.3/site-packages/django/core/handlers/base.py", line 29, in load_middleware
    mod = __import__(mw_module, {}, {}, [''])

  File "/usr/lib/python2.3/site-packages/django/contrib/sessions/middleware.py", line 2, in ?
    from django.contrib.sessions.models import Session

  File "/usr/lib/python2.3/site-packages/django/contrib/sessions/models.py", line 3, in ?
    from django.db import models

  File "/usr/lib/python2.3/site-packages/django/db/__init__.py", line 11, in ?
    backend = __import__('django.db.backends.%s.base' % settings.DATABASE_ENGINE, {}, {}, [''])

  File "/usr/lib/python2.3/site-packages/django/db/backends/mysql/base.py", line 9, in ?
    import MySQLdb as Database

  File "/usr/lib/python2.3/site-packages/MySQL_python-1.2.2-py2.3-linux-i686.egg/MySQLdb/__init__.py", line 19, in ?

  File "/usr/lib/python2.3/site-packages/MySQL_python-1.2.2-py2.3-linux-i686.egg/_mysql.py", line 7, in ?

  File "/usr/lib/python2.3/site-packages/MySQL_python-1.2.2-py2.3-linux-i686.egg/_mysql.py", line 4, in __bootstrap__

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

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

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

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

  File "/usr/lib/python2.3/site-packages/setuptools-0.6c5-py2.3.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: '/.python-eggs'

The Python egg cache directory is currently set to:

  /.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.
- Mark

Offline mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
ExtractionError: Can't extract file(s) to egg cache
« Reply #1 on: May 15, 2007, 10:15:19 PM »
After a few hours of stumbling around the web I found solution. It is simple, which is always good.

Brett Neumeier posted a solution on the trac list at gossamer-threads. His solution was to move the egg to a zip file, create directory with the same name as the egg and unzip the egg contents into the directory.

I am not certain this is cool for a production SME server but it worked like a charm. Thanks to Brett for the great idea.
- Mark

Offline xboxer21

  • ***
  • 60
  • +0/-0
Re: ExtractionError: Can't extract file(s) to egg cache
« Reply #2 on: March 18, 2008, 02:30:54 AM »
Hello Mophilly,
can you please post how you got MySQL for Python installed?

Thanks.
......

Offline xboxer21

  • ***
  • 60
  • +0/-0
Re: ExtractionError: Can't extract file(s) to egg cache
« Reply #3 on: March 19, 2008, 12:41:01 AM »
I got mysql-python working.

installed mysql-devel and built an RPM from the source of mysql-python.

Thanks
......