[pywin32-bugs] [ pywin32-Bugs-754796 ] Reference count bug in ODBC
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2003-06-15 08:04:16
|
Bugs item #754796, was opened at 2003-06-15 08:04 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=754796&group_id=78018 Category: win32 Group: None Status: Open Resolution: None Priority: 5 Submitted By: Frank Millman (chagford) Assigned to: Nobody/Anonymous (nobody) Summary: Reference count bug in ODBC Initial Comment: The following code crashes - import odbc db = odbc.odbc('frank/Adminstrator') def update(): c = db.cursor() try: c.execute("insect into fmtest values ('rubbish')") return ['success'] except: return ['fail'] print update() The update routine tries to insert a record into the database. If it fails (it will in the example as the command is invalid), MSW pops up a box with the message "Python.exe has generated errors and will be closed by Windows", and the dos box displays the message "<refcnt 0 at ....>". The error only occurs if the return type is a list, and if the function returns from the "except" clause. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=754796&group_id=78018 |