Benjamin Peterson <benjamin at python.org> added the comment: You should handle the case of encoding being None. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue8774> _______________________________________