最近まで働いていたコードは、職場でのサーバーを移動した後、エラーを投げているが、私は、データベースを埋めるためのpython、具体的のMySQLdbを使用しています:のMySQLdbエラーcursor.executeを使用して()
コードがあります:
cursor.execute("""SELECT Entry, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P FROM evaluation""")
result = cursor.fetchall()
for record in result:
codeno=int(str(record[15]))
status, progress, reprocessing = RepStatus_new.get_status(code=codeno, proj_tag=str(record[16]),cache_dir="cache", prod_type="g1")
cursor.execute("""UPDATE evaluation SET M=%s WHERE A LIKE %s""",(progress, int(str(record[15]))))
とアップしますエラーは次のとおりです。
File "mySQLtest.py", line 165, in <module>
cursor.execute("""UPDATE evaluation SET M=%s WHERE A LIKE %s""",(progress, int(str(record[15]))))
File "/usr/lib64/python2.5/site-packages/MySQLdb/cursors.py", line 166, in execute
self.errorhandler(self, exc, value)
File "/usr/lib64/python2.5/site-packages/MySQLdb/connections.py", line 35, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1205, 'Lock wait timeout exceeded; try restarting transaction')
私はこのコードは最近まで働いていた言ったように私は、これは間違って起こっている場所がわからないです。誰かが何か提案があれば、大いに感謝します! (Iは読み取り能力を支援するための文字で変数を置き換え!)
をcursor.fetchall後の出力「結果」()