You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Py3.0a4 wsgiref simple_server failed to start #46818
File "/home/delimy/temp/Python-3.0a4/Lib/wsgiref/handlers.py", line
116, in finish_response
self.write(data)
File "/home/delimy/temp/Python-3.0a4/Lib/wsgiref/handlers.py", line
199, in write
self.send_headers()
File "/home/delimy/temp/Python-3.0a4/Lib/wsgiref/handlers.py", line
255, in send_headers
self.send_preamble()
File "/home/delimy/temp/Python-3.0a4/Lib/wsgiref/handlers.py", line
178, in send_preamble
self._write('HTTP/%s %s\r\n' % (self.http_version,self.status))
File "/home/delimy/temp/Python-3.0a4/Lib/wsgiref/handlers.py", line
385, in _write
self.stdout.write(data)
File "/home/delimy/temp/Python-3.0a4/Lib/socket.py", line 222, in write
return self._sock.send(b)
TypeError: send() argument 1 must be bytes or read-only buffer, not str
It should convert str to bytes before write to stdout.
Activity
delimy commentedon Apr 7, 2008
Here's the most recent traceback:
File "/home/delimy/temp/Python-3.0a4/Lib/wsgiref/handlers.py", line
116, in finish_response
self.write(data)
File "/home/delimy/temp/Python-3.0a4/Lib/wsgiref/handlers.py", line
199, in write
self.send_headers()
File "/home/delimy/temp/Python-3.0a4/Lib/wsgiref/handlers.py", line
255, in send_headers
self.send_preamble()
File "/home/delimy/temp/Python-3.0a4/Lib/wsgiref/handlers.py", line
178, in send_preamble
self._write('HTTP/%s %s\r\n' % (self.http_version,self.status))
File "/home/delimy/temp/Python-3.0a4/Lib/wsgiref/handlers.py", line
385, in _write
self.stdout.write(data)
File "/home/delimy/temp/Python-3.0a4/Lib/socket.py", line 222, in write
return self._sock.send(b)
TypeError: send() argument 1 must be bytes or read-only buffer, not str
It should convert str to bytes before write to stdout.
pitrou commentedon Jul 24, 2008
The same bug is being discussed in bpo-3348