https://bugs.documentfoundation.org/show_bug.cgi?id=144902
--- Comment #29 from [email protected] --- (In reply to Mike Kaganski from comment #27) > (In reply to ywupub from comment #26) > > >>> import uno > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > File "C:\Program Files\LibreOffice\program\uno.py", line 19, in <module> > > import pyuno > > ImportError: DLL load failed while importing pyuno: The parameter is > > incorrect. > > So we have some problem related to loading of C:\Program > Files\LibreOffice\program\pyuno.pyd (which is itself a DLL). Loading it into > Python fails with system error 87 ERROR_INVALID_PARAMETER [1]; and it's > unclear what gives that error. > > Could you please try the same procedure with Python (you may use 'import > pyuno' instead of 'import uno'; nothing else is necessary - we only need to > diagnose this specific failure), but before issuing this command, run > Sysinternals' ProcMon, and check if something comes out from it? Maybe there > will be some entries from inside the loaded pyuno.pyd, which ProcMon can > show, and allow to look into call stack, so that we see how far it goes when > loading, or even what has failed. > > Otherwise, we could need to try to use WinDbg to diagnose this on a low > level [2], attaching it to the Python process, putting a breakpoint to the > functions inside pyuno.pyd (e.g., PyInit_pyuno - *if* it goes as far as > calling it), and try to step through until we find a system call resulting > in this error code ... which could be very tedious process. > > [1] > https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--0- > 499- > [2] https://wiki.documentfoundation.org/How_to_get_a_backtrace_with_WinDbg (In reply to Mike Kaganski from comment #28) > API monitor [1] may also be useful. I have tested it locally (I downloaded > the portable version from the link; attached to the python.exe process - the > one with the Pythonic icon (there are two "python.exe" processes); and > selected everything in API Filter section before running 'import pyuno' in > Python), and I saw all the Windows API calls - lots of them - with each > result. So using that, we could also find which function returned the error. > > [1] http://www.rohitab.com/apimonitor#Download I'd like to test, but I think maybe some of these tests beyond my understanding... You mean python standalone on windows? For Sysinternals' ProcMon, I tried to run it before, but it says "Unable to load Process Monitor device driver". -- You are receiving this mail because: You are the assignee for the bug.
