data: [{'token_i32': 1234, 'data_i32': '1234', 'token_i64': 645664, 'data_i64': '645664', 'token_str': '078-05-1111', 'token_bytes': 'byt13es', 'token_email': '[email protected]', 'data_str': 'John Wed, Senior Relationshop Manager', 'masking': '$112000', 'searchable': '[email protected]'}, {'token_i32': 1234, 'data_i32': '1234', 'token_i64': 645664, 'data_i64': '645664', 'token_str': '078-05-1112', 'token_bytes': 'byt13es2', 'token_email': '[email protected]', 'data_str': 'April Cassini, Marketing Manager', 'masking': '$168000', 'searchable': '[email protected]'}, {'token_i32': 1234, 'data_i32': '1234', 'token_i64': 645664, 'data_i64': '645664', 'token_str': '078-05-1117', 'token_bytes': 'byt13es3', 'token_email': '[email protected]', 'data_str': 'George Clooney, Famous Actor', 'masking': '$780000', 'searchable': '[email protected]'}]
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1965, in _exec_single_context
self.dialect.do_execute(
File "/usr/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 921, in do_execute
cursor.execute(statement, parameters)
File "/usr/lib/python3.9/site-packages/pymysql/cursors.py", line 153, in execute
result = self._query(query)
File "/usr/lib/python3.9/site-packages/pymysql/cursors.py", line 322, in _query
conn.query(q)
File "/usr/lib/python3.9/site-packages/pymysql/connections.py", line 558, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/usr/lib/python3.9/site-packages/pymysql/connections.py", line 822, in _read_query_result
result.read()
File "/usr/lib/python3.9/site-packages/pymysql/connections.py", line 1200, in read
first_packet = self.connection._read_packet()
File "/usr/lib/python3.9/site-packages/pymysql/connections.py", line 739, in _read_packet
packet_header = self._read_bytes(4)
File "/usr/lib/python3.9/site-packages/pymysql/connections.py", line 795, in _read_bytes
raise err.OperationalError(
pymysql.err.OperationalError: (2013, 'Lost connection to MySQL server during query')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/extended_example_with_zone.py", line 146, in <module>
write_data(args.data, connection)
File "/app/extended_example_with_zone.py", line 104, in write_data
connection.execute(
File "/usr/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1412, in execute
return meth(
File "/usr/lib/python3.9/site-packages/sqlalchemy/sql/elements.py", line 483, in _execute_on_connection
return connection._execute_clauseelement(
File "/usr/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1635, in _execute_clauseelement
ret = self._execute_context(
File "/usr/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1844, in _execute_context
return self._exec_single_context(
File "/usr/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1984, in _exec_single_context
self._handle_dbapi_exception(
File "/usr/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2339, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/usr/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1965, in _exec_single_context
self.dialect.do_execute(
File "/usr/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 921, in do_execute
cursor.execute(statement, parameters)
File "/usr/lib/python3.9/site-packages/pymysql/cursors.py", line 153, in execute
result = self._query(query)
File "/usr/lib/python3.9/site-packages/pymysql/cursors.py", line 322, in _query
conn.query(q)
File "/usr/lib/python3.9/site-packages/pymysql/connections.py", line 558, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/usr/lib/python3.9/site-packages/pymysql/connections.py", line 822, in _read_query_result
result.read()
File "/usr/lib/python3.9/site-packages/pymysql/connections.py", line 1200, in read
first_packet = self.connection._read_packet()
File "/usr/lib/python3.9/site-packages/pymysql/connections.py", line 739, in _read_packet
packet_header = self._read_bytes(4)
File "/usr/lib/python3.9/site-packages/pymysql/connections.py", line 795, in _read_bytes
raise err.OperationalError(
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query')
[SQL: INSERT INTO test (data_str, masking, token_i32, data_i32, token_i64, data_i64, token_str, token_bytes, token_email) VALUES (%(data_str)s, %(masking)s, %(token_i32)s, %(data_i32)s, %(token_i64)s, %(data_i64)s, %(token_str)s, %(token_bytes)s, %(token_email)s)]
[parameters: {'data_str': b'John Wed, Senior Relationshop Manager', 'masking': b'$112000', 'token_i32': 1234, 'data_i32': b'1234', 'token_i64': 645664, 'data_i64': b'645664', 'token_str': '078-05-1111', 'token_bytes': b'byt13es', 'token_email': '[email protected]'}]
(Background on this error at: https://sqlalche.me/e/20/e3q8)