我正在使用Python与MySQL和Django.我一直看到这个错误,我无法弄清楚抛出异常的位置:
Exception _mysql_exceptions.ProgrammingError: (2014, "Commands out of sync; you can't run this command now") in <bound method Cursor.__del__ of <MySQLdb.cursors.Cursor object at 0x20108150>> ignored
我的代码中有很多"try"和"exception"块 - 如果异常发生在其中一个块中,那么我会看到自己的调试消息.由于我的程序在抛出Exception时没有中止,因此上面的Exception显然被捕获了.
我很困惑,有人可以帮帮我吗?