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 vstinner
Recipients methane, pablogsal, vstinner
Date 2021-03-29.20:56:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1617051389.41.0.227144307155.issue43662@roundup.psfhosted.org>
In-reply-to
Content
> SyntaxError: encoding problem: encoding

This "encoding problem: %s" error message comes from check_coding_spec() of Parser/tokenizer.c. The "%s" argument is the cs variable which is initialized by get_coding_spec().

test_tools.test_reindent_file_with_bad_encoding() uses Lib/test/bad_coding.py which contains a single line:

# -*- coding: uft-8 -*-

The expected encoding name is "uft-8", not "encoding".
History
Date User Action Args
2021-03-29 20:56:29vstinnersetrecipients: + vstinner, methane, pablogsal
2021-03-29 20:56:29vstinnersetmessageid: <1617051389.41.0.227144307155.issue43662@roundup.psfhosted.org>
2021-03-29 20:56:29vstinnerlinkissue43662 messages
2021-03-29 20:56:29vstinnercreate