Issue Details (XML | Word | Printable)

Key: PYFB-74
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Pavel Cisar
Reporter: Thomas Aichinger
Votes: 0
Watchers: 0
Operations

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

TypeError on connect()

Created: 15/Sep/18 07:53 AM   Updated: 15/Sep/18 07:53 AM
Component/s: None
Affects Version/s: 2.0
Fix Version/s: None

Environment:
Linux 4.15.0-34-generic
Python 3.5.2
LI-V6.3.4.26856 Firebird 2.5


 Description  « Hide
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






 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.