sudo python ez_setup.py -f
http://www.turbogears.org/download/index.html --script-dir
/usr/local/bin TurboGears
I then created a new project:
tg-admin fruitbat
cd fruitbat
python fruitbat-start.py
The server then starts up, but as soon as I access the URL I get a
traceback:
2005/12/12 11:58:22 HTTP INFO Serving HTTP on http://localhost:8080/
2005/12/12 11:58:25 INFO Traceback (most recent call last):
File
"/usr/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py",
line 285, in run
applyFilters('onEndResource')
File
"/usr/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py",
line 641, in applyFilters
method()
File
"/usr/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/lib/filter/sessionfilter.py",
line 205, in onEndResource
sess = cherrypy.request._session
NameError: global name 'cherrypy' is not defined
127.0.0.1 - - [2005/12/12 11:58:25] "GET / HTTP/1.1" 500 1236
I imagine there's something fishy going on with my install, given that
CherryPy 2.1.0 is deemed stable.
Is it a known issue?
Graham
--
Graham
I think it's a bug from the session filter of CherryPy 2.1
try to add to the sessionfilter.py file on line 204:
global cherrypy
import cherrypy
Then try again.
- Sylvain
Selon Jared Kuolt <jared...@gmail.com>:
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Thanks for that.
I made the edit then restarted. This time it got a bit further, but
fell over a bit further on.
2005/12/12 12:10:07 INFO Traceback (most recent call last):
File
"/usr/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py",
line 285, in run
applyFilters('onEndResource')
File
"/usr/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py",
line 641, in applyFilters
method()
File
"/usr/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/lib/filter/sessionfilter.py",
line 207, in onEndResource
sess = cherrypy.request._session
File
"/usr/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/__init__.py",
line 70, in __getattr__
return getattr(childobject, name)
AttributeError: _AttributeDump instance has no attribute '_session'
127.0.0.1 - - [2005/12/12 12:10:07] "GET / HTTP/1.1" 500 1406
--
Graham
if hasattr(cherrypy.request, '_session'):
before the "sess = cherrypy.request._session" line
This filter is known to have some issues that Remi is working on.
- Sylvain
Selon Graham Ashton <graham...@gmail.com>:
Yep, that got it past the sessionfilter.py problems. Then it stacked it
again, failing while loading cookies:
2005/12/12 12:46:27 INFO Traceback (most recent call last):
File
"/usr/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py",
line 263, in run
self.processRequestHeaders()
File
"/usr/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py",
line 340, in processRequestHeaders
request.simpleCookie.load(value)
File "/usr/lib/python2.4/Cookie.py", line 621, in load
self.__ParseString(rawdata)
File "/usr/lib/python2.4/Cookie.py", line 652, in __ParseString
self.__set(K, rval, cval)
File "/usr/lib/python2.4/Cookie.py", line 574, in __set
M.set(key, real_value, coded_value)
File "/usr/lib/python2.4/Cookie.py", line 453, in set
raise CookieError("Illegal key value: %s" % key)
CookieError: Illegal key value: hide:inst2
> This filter is known to have some issues that Remi is working on.
Would you recommend that I downgrade? If so, is there any easy way to
do that with the setuptools?
Thanks again.
--
Graham
Downgrading, hell no :)
If you don't mind, I'd rather have you moving this thread to the CherryPy users
list so that Remi can handle it directly.
- Sylvain
Cheers,
Graham