How to properly handle empty data set with python mysql connector?
<p>I am using the python mysql connector in a little script. The problem I'm facing is: when executing a select statement that returns 0 rows, I'm unable to close the cursor. When closing the cursor, "mysql.connector.errors.InternalError: Unread result found" is triggered. However, calling fetchall() results in an "mysql.connector.errors.InterfaceError: No result set to fetch from." error.</p>

<p>So basically, I'm unable to close the cursor because of some unread data and I'm unable to read any data because there is no data to read.</p>