engine = create_engine('mysql+mysqlconnector:mysettings', poolclass=NullPool)
connection = engine.connect()
organization = connection.execute(
"INSERT INTO client (`ip_port`, `okpo`, `chat_id`, `admin_id`, `activate`, `white_list`) VALUES (%s, %s, %s, %s, %s, %s);",
(ip, okpo, chat_id, admin_id, 1, white_ip))
When you run this script crashes error 'Connection' object has no attribute 'commit' , although the data in the database are recorded. What's the problem? Tried instead of connection.commit() to register the engine.commit(). But the error changed to 'Engine' object has no attribute 'commit'. Just tried before connection.commit() to register the connection.begin () but also nothing.