Issue Details (XML | Word | Printable)

Key: PYFB-27
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Pavel Cisar
Reporter: Virgo Pärna
Votes: 0
Watchers: 1

If you were logged in you would be able to see more operations.
Firebird driver for Python

fbclient.dll is sometimes not found

Created: 15/Mar/13 08:57 AM   Updated: 15/Mar/13 09:45 AM
Component/s: None
Affects Version/s: 1.0
Fix Version/s: 1.1

Environment: Windows 7 64 bit, 32 bit Python 3.3

 Description  « Hide
fbclient.dll is not found by _dlopen.

Traceback (most recent call last):
  File "", line 4, in <module>
    import fdb
  File "D:\Python33\lib\site-packages\fdb-1.0-py3.3.egg\fdb\", line 23, in <module>
    from fdb.fbcore import *
  File "D:\Python33\lib\site-packages\fdb-1.0-py3.3.egg\fdb\", line 26, in <module>
    from . import ibase
  File "D:\Python33\lib\site-packages\fdb-1.0-py3.3.egg\fdb\", line 41, in <module>
    fb_library = WinDLL(fb_library_name)
  File "D:\Python33\lib\ctypes\", 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 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.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Pavel Cisar added a comment - 15/Mar/13 09:35 AM
This is a bug in ctypes find_library, see
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.