[mod_python] Error using sessions

berry groenendijk berry.groenendijk at gmail.com
Wed Mar 16 16:54:20 EST 2005


When I set 'use_session = True' in my code I get the following error:

-- begin error --
Mod_python error: "PythonHandler _servlet"

Traceback (most recent call last):

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

  File "./_servlet.py", line 1472, in handler
    servlet._finally()

  File "./_servlet.py", line 688, in _finally
    self.__cleanup_session()

  File "./_servlet.py", line 386, in __cleanup_session
    self.session.save()

  File "/usr/lib64/python2.3/site-packages/mod_python/Session.py",
line 204, in save
    self.do_save(dict)

  File "/usr/lib64/python2.3/site-packages/mod_python/Session.py",
line 327, in do_save
    dbm = self._get_dbm()

  File "/usr/lib64/python2.3/site-packages/mod_python/Session.py",
line 302, in _get_dbm
    result = self._dbmtype.open(self._dbmfile, 'c')

  File "/usr/src/build/475202-x86_64/install/usr/lib64/python2.3/anydbm.py",
line 83, in open
    return mod.open(file, flag, mode)

  File "/usr/src/build/475202-x86_64/install/usr/lib64/python2.3/dbhash.py",
line 16, in open
    return bsddb.hashopen(file, flag, mode)

  File "/usr/src/build/475202-x86_64/install/usr/lib64/python2.3/bsddb/__init__.py",
line 192, in hashopen

DBInvalidArgError: (22, 'Invalid argument')
-- end error --

I am using the Servlet classes from Daniel Popowich:
http://home.comcast.net/~d.popowich/mpservlets/

In standalone programs anydbm and dbhash are working perfectly. What
is the 'invalid argument'?

-- 
Berry Groenendijk
http://www.bersie.de


More information about the Mod_python mailing list