Issue Details (XML | Word | Printable)

Key: PYFB-67
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Pavel Cisar
Reporter: Søren Nielsen
Votes: 0
Watchers: 0
Operations

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

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

Created: 13/Sep/16 11:35 AM   Updated: 15/Feb/17 12:03 PM
Component/s: None
Affects Version/s: 1.6
Fix Version/s: 1.6.1

Environment:
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32
and
Python 3.5 on Fedora 24 with fdb updated using pip


 Description  « Hide
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\fbcore.py", line 3625, in executemany
    self.execute(operation, parameters)
  File "C:\Program Files\Python35\lib\site-packages\fdb\fbcore.py", line 3564, in execute
    if self._ps != None:
ReferenceError: weakly-referenced object no longer exists

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