Author pablogsal
Recipients lukasz.langa, pablogsal, vstinner
Date 2019-09-20.15:24:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568993090.53.0.420338716926.issue38234@roundup.psfhosted.org>
In-reply-to
Content
A very simple way to reproduce the bug:

Using pyInstaller, after applying these patches (to fix other Python3.8 issues)

https://github.com/pyinstaller/pyinstaller/pull/4441
https://github.com/pyinstaller/pyinstaller/pull/4440

you will get

Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

This is because Python will use the default value for sys.path, including the "lib" subdirectory:

/dist/hello/lib/python3.8
            ^----------------> This should not be here

Instead, that value should be the one that pyinstaller passes when calling Py_SetPath() here: 

https://github.com/pyinstaller/pyinstaller/blob/develop/bootloader/src/pyi_pythonlib.c#L495

So it should be:

/dist/hello/python3.8
History
Date User Action Args
2019-09-20 15:24:50pablogsalsetrecipients: + pablogsal, vstinner, lukasz.langa
2019-09-20 15:24:50pablogsalsetmessageid: <1568993090.53.0.420338716926.issue38234@roundup.psfhosted.org>
2019-09-20 15:24:50pablogsallinkissue38234 messages
2019-09-20 15:24:50pablogsalcreate