jjzjj

GetModuleDict

全部标签

python - PyThreadState_GET() 从 PyImport_GetModuleDict() 中返回 NULL

我正在使用Python3.6在Windows上工作。我有以下用于测试python解释器的简单嵌入代码:Py_SetProgramName(L"MyApp");Py_SetPath(L"C:\\Users\\rutski\\Documents\\python\\PCBuild\\amd64\\python36.zip;"L"C:\\Users\\rutski\\Documents\\python\\DLLs;"L"C:\\Users\\rutski\\Documents\\python\\lib;"L"C:\\Users\\rutski\\Documents\\python\\PCBui

python - 致命的 Python 错误 : PyImport_GetModuleDict: no module dictionary

我有一个调用API的脚本。为了加快脚本速度,我尝试实现线程。当我处于空闲状态时,下面的脚本可以工作,但是当我尝试从命令行使用sysargv运行它时,我收到了下面列出的两种类型的错误。错误1FatalPythonerror:PyImport_GetModuleDict:nomoduledictionary!ThisapplicationhasrequeststheRuntimetoterminateitinanunusualway.Pleasecontacttheapplication'ssupportteamformoreinformation.错误2Exceptioninthread