Skip to content
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

TypeError on connect() [PYFB74] #44

Open
firebird-automations opened this issue Sep 15, 2018 · 0 comments
Open

TypeError on connect() [PYFB74] #44

firebird-automations opened this issue Sep 15, 2018 · 0 comments

Comments

@firebird-automations
Copy link

Submitted by: Thomas Aichinger (taich-boy)

Votes: 1

I think I found an error in fdb. Here is the error message when using con.cursor()

LI-V6.3.4.26856 Firebird 2.5
2.5.4.26856
The server is currently using 1791368 bytes of memory.
Exception ignored in: <bound method Cursor.__del__ of <fdb.fbcore.Cursor object at 0x7f5f7eccd780>>
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/fdb/fbcore.py", line 3830, in __del__
File "/usr/local/lib/python3.5/dist-packages/fdb/fbcore.py", line 3572, in close
File "/usr/local/lib/python3.5/dist-packages/fdb/fbcore.py", line 431, in is_dead_proxy
TypeError: isinstance() arg 2 must be a type or tuple of types

This is the code:
#⁠!/usr/bin/env python3
#⁠
import sys
import fdb
dbh = fdb.connect(host='127.0.0.1', database='test', user='SYSDBA', password='masterkey', charset='ISO8859_1')
print(dbh.server_version)
print(dbh.version)
bytesInUse = dbh.database_info(fdb.isc_info_current_memory, 'i')
print('The server is currently using %d bytes of memory.' % bytesInUse)
#⁠ ===> following line produces sometimes error
cur = dbh.cursor()
dbh.close()

If you call this code 3-5 several times you get this error. Sometimes you get it on first run.
I tried this on serveral different linux servers and with different databases. It's everywhere the same.

Maybe because def is_dead_proxy isinstance should return
isinstance(obj, type(weakref.proxytype)) ???

Please help
Thomas

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

No branches or pull requests

2 participants