MySQL Forums
Forum List  »  Connector/Python

Re: Bug? InterfaceError: Failed getting warnings when executing a query with multiple statements with get_warnings
Posted by: Nuno Mariz
Date: August 09, 2019 10:23AM

Hi Barend,
The`cur` is not iterable in your first `cur.execute('SELECT "a"+1')`, you need to call `cur.fetchall()`.
Using using `multi=True` in `cur.execute()` will return an iterable as expected.

The exception is raised because you didn't fetch the results from the first execution.

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.