This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author toxicdav3
Recipients toxicdav3
Date 2010-06-18.00:25:43
SpamBayes Score 0.0002869743
Marked as misclassified No
Message-id <1276820747.2.0.467969862682.issue9022@psf.upfronthosting.co.za>
In-reply-to
Content
The following code produces a type error, but from what I can tell it does comply with PEP333. This issue appeared using Python 3.1.1 and 3.1.2 on both Windows and Ubuntu. I have only tried the 32 bit versions. Works fine in Python 2.6.5.12 but I guess thats irrelevant.

-----
def application(environ, start_response):
	start_response('200 OK',[('Content-type','text/html')])
	return ['<html><body>Hello World!</body></html>']
	
from wsgiref.handlers import CGIHandler
CGIHandler().run(application)
-----
Traceback (most recent call last):
  File "C:\Python31\lib\wsgiref\handlers.py", line 75, in run
    self.finish_response()
  File "C:\Python31\lib\wsgiref\handlers.py", line 116, in finish_response
    self.write(data)
  File "C:\Python31\lib\wsgiref\handlers.py", line 210, in write
    self.send_headers()
  File "C:\Python31\lib\wsgiref\handlers.py", line 266, in send_headers
    self.send_preamble()
  File "C:\Python31\lib\wsgiref\handlers.py", line 196, in send_preamble
    self._write('Status: %s\r\n' % self.status)
  File "C:\Python31\lib\wsgiref\handlers.py", line 402, in _write
    self.stdout.write(data)
TypeError: must be str, not bytes
-----
History
Date User Action Args
2010-06-18 00:25:47toxicdav3setrecipients: + toxicdav3
2010-06-18 00:25:47toxicdav3setmessageid: <1276820747.2.0.467969862682.issue9022@psf.upfronthosting.co.za>
2010-06-18 00:25:45toxicdav3linkissue9022 messages
2010-06-18 00:25:43toxicdav3create