[issue18038] Unhelpful error message on invalid encoding specification

Max Cantor report at bugs.python.org
Thu May 23 00:43:16 CEST 2013


New submission from Max Cantor:

When you specify a nonexistent encoding at the top of a file, like so for example:

# -*- coding: fakefakefoobar -*-

The following exception occurs:

SyntaxError: encoding problem: with BOM

This is very unhelpful, especially in cases where you might have made a typo in the encoding.

----------
components: Library (Lib)
messages: 189840
nosy: Max.Cantor
priority: normal
severity: normal
status: open
title: Unhelpful error message on invalid encoding specification
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18038>
_______________________________________


More information about the Python-bugs-list mailing list