You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having this issue while trying to call a procedure that performs a procedure simple select
import web
db = web.database(dbn='mysql', db='mydata', user='dbuser', pw='foo')
db.query("call sp_myprocedure")
627 if not self.ctx.transactions:
--> 628 self.ctx.commit()
629 return out
630
/usr/lib/pymodules/python2.7/web/db.pyc in commit(unload)
502 def commit(unload=True):
503 # do db commit and release the connection if pooling is enabled.
--> 504 ctx.db.commit()
505 if unload and self.has_pooling:
506 self._unload_context(self._ctx)
ProgrammingError: (2014, "Commands out of sync; you can't run this command now")
After googling around I found that this has to do with a open cursor not being closed or so. I can call this procedure normaly from mysql prompt or from MySQLdb python module. What is the correct way of calling procedures with web.py db api?
The text was updated successfully, but these errors were encountered:
I'm having this issue while trying to call a procedure that performs a procedure simple select
/usr/lib/pymodules/python2.7/web/db.pyc in commit(unload)
502 def commit(unload=True):
503 # do db commit and release the connection if pooling is enabled.
--> 504 ctx.db.commit()
505 if unload and self.has_pooling:
506 self._unload_context(self._ctx)
ProgrammingError: (2014, "Commands out of sync; you can't run this command now")
After googling around I found that this has to do with a open cursor not being closed or so. I can call this procedure normaly from mysql prompt or from MySQLdb python module. What is the correct way of calling procedures with web.py db api?
The text was updated successfully, but these errors were encountered: