Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improved error message when an environment variable is misonfigured.
2 changes: 1 addition & 1 deletion Python/codecs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ _PyCodec_InitRegistry(PyInterpreterState *interp)
// search functions, so this is done after everything else is initialized.
PyObject *mod = PyImport_ImportModule("encodings");
if (mod == NULL) {
return PyStatus_Error("Failed to import encodings module");
return PyStatus_Error("Failed to import encodings module. Your environment probably has misconfigured variables!");
}
Py_DECREF(mod);

Expand Down
Loading