Opened 17 years ago
Closed 17 years ago
#6126 closed (duplicate)
Django dies with FCGI
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Keywords: | FCGI, Error | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I'm not sure if this is to do with django, but I'm occasionally getting errors with fcgi like this:
<type 'exceptions.AssertionError'> Python 2.5.1: /home/user/bin/python Tue Dec 4 22:03:45 2007 A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred. /home/.putter/user/dj-g.net/fcgi.py in run(self=<fcgi.Request object at 0x40b2f98c>) 578 """Runs the handler, flushes the streams, and ends the request.""" 579 try: 580 protocolStatus, appStatus = self.server.handler(self) 581 except: 582 traceback.print_exc(file=self.stderr) protocolStatus undefined, appStatus undefined, self = <fcgi.Request object at 0x40b2f98c>, self.server = <fcgi.WSGIServer object at 0x403f4f2c>, self.server.handler = <bound method WSGIServer.handler of <fcgi.WSGIServer object at 0x403f4f2c>> /home/.putter/user/dj-g.net/fcgi.py in handler(self=<fcgi.WSGIServer object at 0x403f4f2c>, req=<fcgi.Request object at 0x40b2f98c>) 1268 for data in result: 1269 if data: 1270 write(data) 1271 if not headers_sent: 1272 write('') # in case body was empty write = <function write at 0x40c7ed84>, data = '\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 ...text/javascript"></script>\n</body>\n</html>\n\n' /home/.putter/user/dj-g.net/fcgi.py in write(data='\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 ...text/javascript"></script>\n</body>\n</html>\n\n') 1210 1211 def write(data): 1212 assert type(data) is str, 'write() argument must be string' 1213 assert headers_set, 'write() before start_response()' 1214 builtin type = <type 'type'>, data = '\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 ...text/javascript"></script>\n</body>\n</html>\n\n', builtin str = <type 'str'>
Change History (2)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I am experiencing the same problems. I do not understand the whole thing but here is the fix I figured out.
if you look at the write function
their is an assert type(data) is str
Well it seems as if their is something in their that can be printed out but this check doesn't considere it viable. when I disable this check, which I don't want to do, everything works fine.
If their is anymore I can contribute just let me know I am not sure where to go from here.