Issue #293 resolved

File based sessions require sessionFilter.storagePath to be set

John P. Speno
created an issue

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/", line 270, in run applyFilters('beforeRequestBody') File "/usr/local/lib/python2.4/site-packages/cherrypy/", line 654, in applyFilters method() File "/usr/local/lib/python2.4/site-packages/cherrypy/lib/filter/", line 144, in beforeRequestBody sess.sessionStorage.acquireLock() File "/usr/local/lib/python2.4/site-packages/cherrypy/lib/filter/", line 265, in acquireLock filePath = self._getFilePath(cherrypy.session['_id']) File "/usr/local/lib/python2.4/site-packages/cherrypy/lib/filter/", line 308, in _getFilePath filePath = os.path.join(storagePath, fileName) File "/usr/local/lib/python2.4/", 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.

Comments (6)

  1. Anonymous

    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

  2. Log in to comment