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

Cursor fails after use with executemany(). ReferenceError: weakly-referenced object no longer exists [PYFB67] #84

Closed
firebird-automations opened this issue Sep 13, 2016 · 2 comments

Comments

@firebird-automations
Copy link

Submitted by: Søren Nielsen (swn)

Cursor fails with "ReferenceError: weakly-referenced object no longer exists" after use with executemany().

The following program reproduced the error on both my systems. It worked using fdb 1.4.x.

-------------------------
import fdb

connection = fdb.create_database("CREATE DATABASE 'test.db' user 'SYSDBA' password 'masterkey'")

cursor = connection.cursor()

cursor.execute("CREATE TABLE TEST (ID INTEGER PRIMARY KEY)")
connection.commit()

cursor.executemany("INSERT INTO TEST VALUES(?)", [(1,), (2,)])
cursor.executemany("INSERT INTO TEST VALUES(?)", [(3,), (4,)])
-------------------------

Traceback (most recent call last):
File "C:\Users\swn\Programmering\tmp\fdb_weak_ref.py", line 14, in <module>
cursor.executemany("INSERT INTO TEST VALUES(?)", [(3,), (4,)])
File "C:\Program Files\Python35\lib\site-packages\fdb\http://fbcore.py", line 3625, in executemany
self.execute(operation, parameters)
File "C:\Program Files\Python35\lib\site-packages\fdb\http://fbcore.py", line 3564, in execute
if self._ps != None:
ReferenceError: weakly-referenced object no longer exists

Commits: c37c256 FirebirdSQL/fbt-repository@c507b0a

@firebird-automations
Copy link
Author

Modified by: @pcisar

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 1.6.1 [ 10753 ]

@firebird-automations
Copy link
Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

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