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 wrohdewald
Recipients wrohdewald
Date 2014-10-27.18:41:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1414435295.09.0.872195623782.issue22745@psf.upfronthosting.co.za>
In-reply-to
Content
The attached script works with Python2.7. With Python3.4, it produces

Traceback (most recent call last):
  File "/usr/lib/python3.4/cgitb.py", line 268, in __call__
    self.handle((etype, evalue, etb))
  File "cgibug.py", line 12, in handle
    cgitb.Hook.handle(self, info)
  File "/usr/lib/python3.4/cgitb.py", line 273, in handle
    self.file.write(reset())
TypeError: 'str' does not support the buffer interface

When replacing the file mode 'wb' with 'w', it produces this failure:
  File "/usr/lib/python3.4/cgitb.py", line 288, in handle
    self.file.write(doc + '\n')
TypeError: can't concat bytes to str

The script works as expected with Python2.7 with both file modes.
History
Date User Action Args
2014-10-27 18:41:35wrohdewaldsetrecipients: + wrohdewald
2014-10-27 18:41:35wrohdewaldsetmessageid: <1414435295.09.0.872195623782.issue22745@psf.upfronthosting.co.za>
2014-10-27 18:41:35wrohdewaldlinkissue22745 messages
2014-10-27 18:41:34wrohdewaldcreate