CherryPy sessions
I almost started pulling my hair over this. The part of the CherryPy book on sessions said that the following code would turn on sessions in CherryPy 2.1:
cherrypy.config.update({'session_filter.on' : True})
However trying to access session data after that resulted in a “500 Internal Error” page telling me that sessions weren’t enabled. Huh?
Luckliy I found this post on the topic. There’s apparently a typo in the book, the line should read:
cherrypy.config.update({'sessionFilter.on' : True})
Close this Window Bookmark and Share This Page
Copy HTML:
If you like this then please subscribe to the RSS Feed.
![[Digg]](http://therning.org/magnus/wp-content/plugins/bookmarkify/digg.png)
![[Reddit]](http://therning.org/magnus/wp-content/plugins/bookmarkify/reddit.png)
Magnus:
It seems I was looking in the wrong version of the book. The upcomming version (in the
12 January 2006, 11:24 amtrunk) is published on the same page as the released version (for CherryPy v2.1).therning.org/ magnus » Django seems cool:
[...] I’ve spent a few hours tonight playing with django. I have a small project in mind and at first I thought I’d just go for cherrypy since I’ve played with that before. After hearing Guido’s praise for django on FLOSS weekly I decided to take a look at it. [...]
20 August 2006, 11:06 pmyguaratã:
I have the 2.2.1 version, and both of them works(session_filter or sessionFilter).
8 February 2007, 7:25 pmTarek:
Try the new release of CherryPy, dealing with sessions there is much easier now.
4 July 2008, 1:56 pmhttp://www.cherrypy.org/wiki/CherryPySessions