Вот такой код:
postconn = mysql.connector.connect(user='root', password='Infinity8', host='127.0.0.1', database='geodb')
postcursor = postconn.cursor() # вот я объявил курсор
....
print ("currently selected ID: ", mydata[0])
sql_update_flag = """ UPDATE REQUESTS SET fl_ready = {0} WHERE request_id={1} """.format(set_flag, current_id)
print (sql_update_flag)
print ("Before commit")
currSrc.execute(sql_update_flag)
print "after commit"
connSrc.commit()
Судя по логу падает вот тут:
currSrc.execute(sql_update_flag)
('currently selected ID: ', 10)
UPDATE REQUESTS SET fl_ready = 11 WHERE request_id=10
Before commit
Traceback (most recent call last):
File "C:\monitoring\GetRequest.py", line 168, in <module>
main()
File "C:\monitoring\GetRequest.py", line 164, in main
SyncRequest(postconn, fireconn)
File "C:\monitoring\GetRequest.py", line 92, in SyncRequest
currSrc.execute(sql_update_flag)
File "C:\Python27\ArcGIS10.2\lib\site-packages\mysql\connector\cursor.py", line 485, in execute
self._connection.handle_unread_result()
File "C:\Python27\ArcGIS10.2\lib\site-packages\mysql\connector\connection.py", line 1057, in handle_unread_result
raise errors.InternalError("Unread result found")
mysql.connector.errors.InternalError: Unread result found