[mod_python] Upgrading 3.2.10 -> 3.3.1

elias.collas at gulfstream.com elias.collas at gulfstream.com
Mon Nov 5 15:30:05 EST 2007


I've checked the list archives and the mod_python FAQ but now it's time to
ask the experts:

I'm trying to upgrade to version 3.3.1 without breaking my production
3.2.10 server. Here are my specifics:

Apache 2.2.0
Python 2.4.3

I'm attempting to run a Virtual Host with an apache configured with
mod_python 3.3.1. Here's my .htaccess file. Most of the paths are symbolic
links to the python2.4 site-packages directory etc. I'm trying to avoid
loading anything with sys.path but something's not right.

SetHandler mod_python
PythonPath "['/cluster/stress/methods/downloads/mod_python-3.3.1
/lib/python', \
    '/cluster/stress/u308168/site-python/python2.4',\
    '/cluster/stress/u308168/site-python/simplejson-1.4-py2.4.egg', \
    '/cluster/stress/u308168/site-python/lib-dynload', \
    '/cluster/stress/u308168/site-python/Numeric', \
    '/cluster/stress/u308168/site-python', \
    '/cluster/stress/u308168/public_html/gflat']"
PythonHandler mod_python.publisher
PythonOption mod_python.session.session_type DbmSession
PythonOption mod_python.dbm_session.database_directory /scratch/u308168
PythonDebug On
PythonOption data_path /cluster/stress/methadmin/jfat/ncdata
<FilesMatch "\.(gif|jpe?g|png|css|js|tmpl)$">
   SetHandler default-handler
</FilesMatch>

When I run this, it appears that the mod_python is still loading the old
apache module. Here's the error I get:

Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

  File
"/cluster/stress/methods/local/lib/python2.4/site-packages/mod_python/apache.py",
 line 299, in HandlerDispatch
    result = object(req)

  File "/cluster/stress/methods/downloads/mod_python-3.3.1
/lib/python/mod_python/publisher.py", line 204, in handler
    module = page_cache[req]

  File "/cluster/stress/methods/downloads/mod_python-3.3.1
/lib/python/mod_python/cache.py", line 82, in __getitem__
    return self._checkitem(name)[2]

  File "/cluster/stress/methods/downloads/mod_python-3.3.1
/lib/python/mod_python/cache.py", line 124, in _checkitem
    value = self.build(key, name, opened, entry)

  File "/cluster/stress/methods/downloads/mod_python-3.3.1
/lib/python/mod_python/publisher.py", line 77, in build
    return ModuleCache.build(self, key, req, opened, entry)

  File "/cluster/stress/methods/downloads/mod_python-3.3.1
/lib/python/mod_python/cache.py", line 371, in build
    exec opened in module.__dict__

  File "/cluster/stress/u308168/public_html/gflat/snlife/index.py", line 7,
in ?
    model = apache.import_module('../gflat.py')##, log=1)

  File
"/cluster/stress/methods/local/lib/python2.4/site-packages/mod_python/apache.py",
 line 461, in import_module
    f, p, d = imp.find_module(parts[i], path)

ImportError: No module named

Any suggestions?

Elias Collas
Stress Methods Group
Gulfstream Aerospace Corp

This e-mail message, including all attachments, is for the sole use of the
intended recipient(s) and may contain legally privileged and confidential
information.  If you are not an intended recipient, you are hereby notified
that you have either received this message in error or through
interception, and that any review, use, distribution, copying or disclosure
of this message or its attachments is strictly prohibited and is subject to
criminal and civil penalties.  All personal messages express solely the
sender's views and not those of Gulfstream Aerospace Corporation.  If you
received this message in error, please contact the sender by reply e-mail
and destroy all copies of the original message.





More information about the Mod_python mailing list