[mod_python] Pickled objects require _apache on un-pickling (mod_python 3.2.8)

Webb Sprague webb.sprague at gmail.com
Mon Apr 3 11:20:25 EDT 2006


I have a web application that pickles objects after doing some
statistical analyses on data that is entered through a form, with a
mod_python infrastructure.  Now I am trying to unpickle those objects
in ipython, but I get the strange error "can't find _apache" (see
stack trace below) on cPickle.loads() (line 108).  It works fine
through the web browser.  Why would this object possibly want _apache
or apache -- it doesn't import anything to do with mod_python
explicitly, and I can create these objects outside of the web.  I can
post more code or more error messages if it would help


In [30]: lcdb.retrieveObject(14)
exceptions.ImportError                               Traceback (most
recent call last)

/var/www/localhost/htdocs/larry/<ipython console>

/var/www/localhost/htdocs/larry/LcDB.py in retrieveObject(self,
    106                 if instancePickled == None:
    107                         raise LcDataException, "No such data
object: %i" % objectSerialNumber
--> 108                 instance = cPickle.loads(instancePickled)
    109                 curs.close()
    110                 return instance

     19 # $Id: util.py 374268 2006-02-02 05:31:45Z nlehuen $
---> 21 import _apache
     22 import apache
     23 import cStringIO

ImportError: No module named _apache

More information about the Mod_python mailing list