Skip to content

Commit

Permalink
pythongh-125873: Add hint when failing to import encodings
Browse files Browse the repository at this point in the history
  • Loading branch information
refeed committed Oct 27, 2024
1 parent c5b99f5 commit c14d804
Showing 1 changed file with 1 addition and 1 deletion.
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. Are you sure PYTHONHOME is correct?");
}
Py_DECREF(mod);

Expand Down

0 comments on commit c14d804

Please sign in to comment.