I know absolutely nothing about Python but have ended up owning C++ code that is based on it.
I'm using Python 3.6.0 and Visual Studio 2022 Community on Windows 11, though also seeing the same problem on Windows 10.
PyImport_Import() is being called to open a... something... "module" might be the term?
I'd like to know what specific file it's looking for.
Existing code included the following:
PyObject* sys_path = PySys_GetObject("path");
PyObject_Print(sys_path, stdout, Py_PRINT_RAW);
PyObject_Print(module_name_py, stdout, Py_PRINT_RAW);
modulePtr = PyImport_Import(module_name_py);
But alas modulePtr is nullptr for this call.
module_name_py is something.otherthing.something.
What file is it even looking for, exactly, and where? I've spent an hour reading on-line python docs and no page actually is spelling that out.
sys_path includes T:\my\dir\here and there is a file called T:\my\dir\here\something\otherthing\something.py which I thought might be it but it's not being found.
All users are me, so I don't think it's a permissioning problem. I can open this .py file manually; it's just a 200 line machine-generated file of stubs.
On Linux I'd simply use strace to see exactly what directories it's looking in, and what file name. Is there any way to do the same on Windows11?