| Bug #86139 | Python connctor fails when single stepping in Visual Studio | ||
|---|---|---|---|
| Submitted: | 29 Apr 2017 9:31 | Modified: | 3 Jun 2017 9:03 |
| Reporter: | Justas Poderys | Email Updates: | |
| Status: | No Feedback | Impact on me: | |
| Category: | Connector / Python | Severity: | S3 (Non-critical) |
| Version: | 2.1.4 | OS: | Windows |
| Assigned to: | Assigned Account | CPU Architecture: | Any |
[3 May 2017 9:03]
Chiranjeevi Battula
Hello Justas Poderys, Thank you for the bug report. I could not repeat the issue at our end using with Connector / Python 2.1.6 and Visual Studio 2017. Could you please provide repeatable test case (exact steps/sample code, screenshot etc. - please make it as private if you prefer) to confirm this issue at our end? Thanks, Chiranjeevi.
[4 Jun 2017 1:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".

Description: Python connector fails when debugging code (Single stepping). Using this code: import mysql.connector try: cnx = mysql.connector.connect( host='XXX.rds.amazonaws.com', user='user', password='pass', database='mydb' ) cursor = cnx.cursor() cursor.execute('SELECT * FROM flights LIMIT 0,10', ()) rows = cursor.fetchall() print(cursor.rowcount) print(rows) cursor.close() cnx.close() except Exception as exc: print(exc) Returns results as intended. However, placing a break-point on line "cursor = cnx.cursor()" and running code line by line in Python Tools for Visual Studio 2015, "rows = cursor.fetchall()" raises exception "No result set to fetch from." Placing a breakpoint immediately after fetchall() (i.e. on printing rowscount) fixes the issue. How to repeat: Using this code: import mysql.connector try: cnx = mysql.connector.connect( host='XXX.rds.amazonaws.com', user='user', password='pass', database='mydb' ) cursor = cnx.cursor() cursor.execute('SELECT * FROM flights LIMIT 0,10', ()) rows = cursor.fetchall() print(cursor.rowcount) print(rows) cursor.close() cnx.close() except Exception as exc: print(exc)