Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
5.0 kB
3
Indexable
Never
[mariotest@testmarioberluchi session_data_updater]$ python3 main.py 
Start download from 20190403 to 20190501
Start write to db
Traceback (most recent call last):
  File "/usr/local/lib64/python3.6/site-packages/pymysql/connections.py", line 713, in _write_bytes
    self._sock.sendall(data)
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1244, in _execute_context
    cursor, statement, parameters, context
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 550, in do_execute
    cursor.execute(statement, parameters)
  File "/usr/local/lib64/python3.6/site-packages/pymysql/cursors.py", line 170, in execute
    result = self._query(query)
  File "/usr/local/lib64/python3.6/site-packages/pymysql/cursors.py", line 328, in _query
    conn.query(q)
  File "/usr/local/lib64/python3.6/site-packages/pymysql/connections.py", line 516, in query
    self._execute_command(COMMAND.COM_QUERY, sql)
  File "/usr/local/lib64/python3.6/site-packages/pymysql/connections.py", line 771, in _execute_command
    self._write_bytes(packet)
  File "/usr/local/lib64/python3.6/site-packages/pymysql/connections.py", line 718, in _write_bytes
    "MySQL server has gone away (%r)" % (e,))
pymysql.err.OperationalError: (2006, "MySQL server has gone away (BrokenPipeError(32, 'Broken pipe'))")

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "main.py", line 49, in <module>
    if __name__ == '__main__':
  File "main.py", line 45, in main
    index=False,
  File "/usr/local/lib64/python3.6/site-packages/pandas/core/generic.py", line 2531, in to_sql
    dtype=dtype, method=method)
  File "/usr/local/lib64/python3.6/site-packages/pandas/io/sql.py", line 460, in to_sql
    chunksize=chunksize, dtype=dtype, method=method)
  File "/usr/local/lib64/python3.6/site-packages/pandas/io/sql.py", line 1173, in to_sql
    table.create()
  File "/usr/local/lib64/python3.6/site-packages/pandas/io/sql.py", line 572, in create
    if self.exists():
  File "/usr/local/lib64/python3.6/site-packages/pandas/io/sql.py", line 560, in exists
    return self.pd_sql.has_table(self.name, self.schema)
  File "/usr/local/lib64/python3.6/site-packages/pandas/io/sql.py", line 1201, in has_table
    schema or self.meta.schema,
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2147, in run_callable
    return conn.run_callable(callable_, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1604, in run_callable
    return callable_(self, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/dialects/mysql/base.py", line 2349, in has_table
    ).execute(st)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 982, in execute
    return self._execute_text(object_, multiparams, params)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1155, in _execute_text
    parameters,
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1248, in _execute_context
    e, statement, parameters, cursor, context
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1466, in _handle_dbapi_exception
    util.raise_from_cause(sqlalchemy_exception, exc_info)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 383, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 128, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1244, in _execute_context
    cursor, statement, parameters, context
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 550, in do_execute
    cursor.execute(statement, parameters)
  File "/usr/local/lib64/python3.6/site-packages/pymysql/cursors.py", line 170, in execute
    result = self._query(query)
  File "/usr/local/lib64/python3.6/site-packages/pymysql/cursors.py", line 328, in _query
    conn.query(q)
  File "/usr/local/lib64/python3.6/site-packages/pymysql/connections.py", line 516, in query
    self._execute_command(COMMAND.COM_QUERY, sql)
  File "/usr/local/lib64/python3.6/site-packages/pymysql/connections.py", line 771, in _execute_command
    self._write_bytes(packet)
  File "/usr/local/lib64/python3.6/site-packages/pymysql/connections.py", line 718, in _write_bytes
    "MySQL server has gone away (%r)" % (e,))
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2006, "MySQL server has gone away (BrokenPipeError(32, 'Broken pipe'))")
[SQL: DESCRIBE `i_model_sessions_data`]
(Background on this error at: http://sqlalche.me/e/e3q8)
[mariotest@testmarioberluchi session_data_updater]$