Skip to content

Commit c14d804

Browse files
committed
pythongh-125873: Add hint when failing to import encodings
1 parent c5b99f5 commit c14d804

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/codecs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,7 @@ _PyCodec_InitRegistry(PyInterpreterState *interp)
15261526
// search functions, so this is done after everything else is initialized.
15271527
PyObject *mod = PyImport_ImportModule("encodings");
15281528
if (mod == NULL) {
1529-
return PyStatus_Error("Failed to import encodings module");
1529+
return PyStatus_Error("Failed to import encodings module. Are you sure PYTHONHOME is correct?");
15301530
}
15311531
Py_DECREF(mod);
15321532

0 commit comments

Comments
 (0)