classification
Title: Py3.0a4 wsgiref simple_server failed to start
Type: crash Stage:
Components: Library (Lib) Versions: Python 3.0
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Cannot start wsgiref simple server in Py3k
View: 3348
Assigned To: Nosy List: delimy, pitrou
Priority: normal Keywords:

Created on 2008-04-07 03:29 by delimy, last changed 2008-07-24 15:34 by pitrou. This issue is now closed.

Messages (2)
msg65063 - (view) Author: (delimy) Date: 2008-04-07 03:29
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.
msg70208 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-07-24 15:34
The same bug is being discussed in #3348
History
Date User Action Args
2008-07-24 15:34:15pitrousetstatus: open -> closed
resolution: duplicate
superseder: Cannot start wsgiref simple server in Py3k
messages: + msg70208
nosy: + pitrou
2008-04-07 03:29:54delimycreate