Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Ticket #293 (defect)

Opened 3 years ago

Last modified 3 years ago

File based sessions require sessionFilter.storagePath to be set

Status: closed (fixed)

Reported by: speno Assigned to: rdelon
Priority: normal Milestone: 2.2-rc1
Component: CherryPy code Keywords: sessions
Cc:

If you use sessionFilter.storagetype = 'File' and don't set sessionfilter.storagePath, you get this nice traceback:

Traceback (most recent call last):
  File "/usr/local/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 270, in run
    applyFilters('beforeRequestBody')
  File "/usr/local/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 654, in applyFilters
    method()
  File "/usr/local/lib/python2.4/site-packages/cherrypy/lib/filter/sessionfilter.py", line 144, in beforeRequestBody
    sess.sessionStorage.acquireLock()
  File "/usr/local/lib/python2.4/site-packages/cherrypy/lib/filter/sessionfilter.py", line 265, in acquireLock
    filePath = self._getFilePath(cherrypy.session['_id'])
  File "/usr/local/lib/python2.4/site-packages/cherrypy/lib/filter/sessionfilter.py", line 308, in _getFilePath
    filePath = os.path.join(storagePath, fileName)
  File "/usr/local/lib/python2.4/posixpath.py", line 62, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

I think a default path is needed, updated documentation, or a better failure message.

Change History

10/18/05 09:25:15: Modified by mikerobi

I default path will still be a problem if it doesn't exist, so I vote for a nicer error message. This is very similar to ticket:272

01/26/06 17:19:20: Modified by anonymous

Anyone ever going to fix this? Heh.

01/28/06 04:19:05: Modified by rdelon

  • status changed from new to assigned.
  • milestone set to 2.2-rc1.

Yeah, I will for 2.2-rc1 :)

02/28/06 09:44:15: Modified by rdelon

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed in [983]

Hosted by WebFaction

Log in as guest/cpguest to create tickets