Serhiy Storchaka added the comment: May be make an error message more symmetric to the one in the decoder case? ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue31271> _______________________________________