Subject kinterbasdb - services api
Author Werner F. Bruhin
I am getting the following exception when I try to use some of the
services api.

con.getConnectionCount()
File "<console>", line 1, in <module>
File "C:\Python25\lib\site-packages\kinterbasdb\services.py", line
157, in getConnectionCount
return self._get_isc_info_svc_svr_db_info()[0]
File "C:\Python25\lib\site-packages\kinterbasdb\services.py", line
836, in _get_isc_info_svc_svr_db_info
assert raw[-1] == chr(_ksrv.isc_info_flag_end)
''' <type 'exceptions.AssertionError'> : '''
>>> con = services.connect(user='sysdba', password='masterkey')
>>> con.getAttachedDatabaseNames()
File "<console>", line 1, in <module>
File "C:\Python25\lib\site-packages\kinterbasdb\services.py", line
160, in getAttachedDatabaseNames
return self._get_isc_info_svc_svr_db_info()[1]
File "C:\Python25\lib\site-packages\kinterbasdb\services.py", line
836, in _get_isc_info_svc_svr_db_info
assert raw[-1] == chr(_ksrv.isc_info_flag_end)
''' <type 'exceptions.AssertionError'> : '''

I am converting my application to use sqlalchemy (currently 0.5beta1)
and have problems with the services.restore. It seems that SA is
"hanging" on to a connection even after closing everything, so I wanted
to use GetConnectionCount() to check this.

Werner

P.S.
I am on Windows and use the following:
con.getServerVersion()
'WI-V2.1.0.17798 Firebird 2.1'