Skip to content

Loading…

Calling simple procedure raises ProgrammingError: (2014, "Commands out of sync; you can't run this command now") #115

Open
marcelomendes opened this Issue · 3 comments

3 participants

@marcelomendes

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?

@aaronsw
@marcelomendes

Hi, thanks for the quick reply, I'll check it out :)

@jeremyklein

This issue appears to be closed. @marcelomendes can you close this ticket?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.