Closed njzjz closed 1 month ago
That's a strange error. Is this error intermittent? How frequently does it happen?
Not very frequently, but I have seen this message several times. When searching on GitHub, I also see someone got the same error message in a different package: https://github.com/rdkit/rdkit/discussions/7072
I have found the cause of the error. Unless told otherwise, ctypes
assumes that the return type of a function is a 32-bit C int
. LoadLibraryExW()
returns a 64-bit pointer to where the DLL is loaded. If the DLL happens to be loaded at an address that is a multiple of 0x100000000
, then casting the address to a 32-bit C int
results in the value 0
. Python then sees a return value of 0
and thinks that the DLL failed to load. The problem is intermittent because the address at which the DLL is loaded is random.
The solution is to tell ctypes
what the return type is.
thanks for the timely fix @adang1345! 👍
We got this error message in the GitHub Actions (see log):
which is a piece of code in the
netCDF4
package generated bydelvewheel
. https://github.com/adang1345/delvewheel/blob/e74686253154416dcba7c0cfd644f3b847bf267c/delvewheel/_wheel_repair.py#L73-L74According to the Windows documentation, this error message means no error:
So the error message does not make sense to me.