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 Tibor Csonka, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2019-05-27.15:11:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> When Py_SetPath is used to set up module path at initialization, the Py_SetPath causes getpathp.c::calculate_path not to be called. However, calculate path is the only function calling getpathp.c::get_progpath which initializes the local dllpath static variable.

I fixed this issue in Python 3.8 with this commit:

commit 410759fba80aded5247b693c60745aa16906f3bb
Author: Victor Stinner <>
Date:   Sat May 18 04:17:01 2019 +0200

    bpo-36763: Remove _PyCoreConfig.dll_path (GH-13402)

I modified Py_SetPath() like that:

-    new_config.dll_path = _PyMem_RawWcsdup(L"");
+    new_config.dll_path = _Py_GetDLLPath();

Py_SetPath() no longer sets dll_path to an empty string.

Since we only got one bug report and I believe that Tibor Csonka found a way to workaround the issue since he reported it, I close the issue.

Please reopen/comment the issue if you would like to get this issue fixed in Python 3.7 as well.


Moreover, the PEP 587 now has a better API to configure embedded Python. I just implemented this PEP in bpo-36763.
Date User Action Args
2019-05-27 15:11:06vstinnersetrecipients: + vstinner, paul.moore, tim.golden, zach.ware, steve.dower, Tibor Csonka
2019-05-27 15:11:06vstinnersetmessageid: <>
2019-05-27 15:11:06vstinnerlinkissue29778 messages
2019-05-27 15:11:06vstinnercreate