-
Notifications
You must be signed in to change notification settings - Fork 290
DLL loading issue on Windows #73
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
You're seeing find_library throw an error? That's not the documented behavior. Can you give a stack trace or error log? I don't have a windows machine to test on but would be happy to get a diff. |
Here's the stack trace, I'm not exactly sure whether its find_library that's causing the problem, but its what tipped me off to try and rename the dll:
|
How did you get magic1.dll? |
Merging into #293 |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Recently, I've been having problems getting python-magic to work on Windows. I have libmagic installed, along with all the necessary DLLs (including
magic1.dll
) but I kept getting Windows 126 errors(module not found). I tried specifying the DLL in the PATH or passing it into the constructor with no luck.In the end I decided to rename
magic1.dll
tomagic.dll
and it started working.After looking at the source it appears that python-magic tries to load either
magic.dll
ormagic1.dll
, however ifmagic.dll
is not found, Windows directly throws an 126 error and doesn't look formagic1.dll
. It could be worth considering another, more reliable way of finding the proper DLL.The text was updated successfully, but these errors were encountered: