Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fbclient.dll is sometimes not found [PYFB27] #49

Closed
firebird-automations opened this issue Mar 15, 2013 · 2 comments
Closed

fbclient.dll is sometimes not found [PYFB27] #49

firebird-automations opened this issue Mar 15, 2013 · 2 comments

Comments

@firebird-automations
Copy link

Submitted by: Virgo Pärna (virgo)

fbclient.dll is not found by _dlopen.

Traceback (most recent call last):
File "test_fb.py", line 4, in <module>
import fdb
File "D:\Python33\lib\site-packages\fdb-1.0-py3.3.egg\fdb\__init__.py", line 23, in <module>
from fdb.fbcore import *
File "D:\Python33\lib\site-packages\fdb-1.0-py3.3.egg\fdb\http://fbcore.py", line 26, in <module>
from . import ibase
File "D:\Python33\lib\site-packages\fdb-1.0-py3.3.egg\fdb\http://ibase.py", line 41, in <module>
fb_library = WinDLL(fb_library_name)
File "D:\Python33\lib\ctypes\__init__.py", line 353, in __init__
self._handle = _dlopen(self._name, mode)
TypeError: bad argument type for built-in operation

I fixed it for myselt by adding:
elif sys.platform in ['win32']:
fb_library_name = find_library('fbclient.dll')

into http://ibase.py. But i don't know, if it's needed for every Python versions/Windows version. I don't have 64 bit python installed, so I don't know, if it is issue there do. In that case probably 64 bit Windows should probably have special behavior also.

Commits: 2335712

@firebird-automations
Copy link
Author

Commented by: @pcisar

This is a bug in ctypes find_library, see http://bugs.python.org/issue16283
As only stars know when it would be fixed, I'll apply your patch as it appears as good enough workaround that doesn't have any unwanted side effects on other platforms nor Windows in general.

@firebird-automations
Copy link
Author

Modified by: @pcisar

status: Open [ 1 ] => Closed [ 6 ]

resolution: Fixed [ 1 ]

Fix Version: 1.1 [ 10520 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants