LogViewer
=========================================================================
2025-09-17 16:25:47 Wed	START TASK.01	future_1d  future_rank
=========================================================================
2025-09-17 16:26:00,523 - future_1d - INFO - future_rank check=True check_last=7 start...
2025-09-17 16:26:03,068 - future_1d - INFO - future_rank date = 2025-09-09
2025-09-17 16:26:03,240 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='CZCE) done
2025-09-17 16:26:03,334 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='CFFEX) done
2025-09-17 16:26:03,470 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='DCE) done
2025-09-17 16:26:03,787 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='GFEX) done
2025-09-17 16:26:03,857 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='INE) done
2025-09-17 16:26:04,028 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='SHFE) done
2025-09-17 16:27:29,350 - future_1d - INFO - save future_rank 2025-09-09 completed
2025-09-17 16:27:33,034 - future_1d - INFO - future_rank date = 2025-09-10
2025-09-17 16:27:33,226 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='CZCE) done
2025-09-17 16:27:36,906 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='CFFEX) done
2025-09-17 16:27:37,056 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='DCE) done
2025-09-17 16:27:37,135 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='GFEX) done
2025-09-17 16:27:52,310 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='INE) done
2025-09-17 16:27:52,439 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='SHFE) done
2025-09-17 16:29:19,368 - future_1d - INFO - save future_rank 2025-09-10 completed
2025-09-17 16:29:24,413 - future_1d - INFO - future_rank date = 2025-09-11
2025-09-17 16:29:24,896 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='CZCE) done
2025-09-17 16:29:25,264 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='CFFEX) done
2025-09-17 16:29:25,395 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='DCE) done
2025-09-17 16:29:25,479 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='GFEX) done
2025-09-17 16:29:25,547 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='INE) done
2025-09-17 16:29:25,701 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='SHFE) done
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 951, in do_execute
    cursor.execute(statement, parameters)
  File "/usr/local/lib/python3.10/site-packages/pymysql/cursors.py", line 158, in execute
    result = self._query(query)
  File "/usr/local/lib/python3.10/site-packages/pymysql/cursors.py", line 325, in _query
    conn.query(q)
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 549, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 779, in _read_query_result
    result.read()
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 1164, in read
    self._read_result_packet(first_packet)
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 1240, in _read_result_packet
    self._read_rowdata_packet()
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 1274, in _read_rowdata_packet
    packet = self.connection._read_packet()
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 715, in _read_packet
    recv_data = self._read_bytes(bytes_to_read)
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 752, 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 "/root/project/future_1d/future_rank.py", line 8, in 
    client.save_future_rank(check=True, check_last=7)
  File "/root/project/future_1d/future1d_request.py", line 978, in save_future_rank
    df_db = pd.read_sql(f"select * from {tablebase.__tablename__} where date = '{td}'", self.engine)
  File "/usr/local/lib/python3.10/site-packages/pandas/io/sql.py", line 736, in read_sql
    return pandas_sql.read_query(
  File "/usr/local/lib/python3.10/site-packages/pandas/io/sql.py", line 1848, in read_query
    result = self.execute(sql, params)
  File "/usr/local/lib/python3.10/site-packages/pandas/io/sql.py", line 1671, in execute
    return self.con.exec_driver_sql(sql, *args)
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1779, in exec_driver_sql
    ret = self._execute_context(
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1846, in _execute_context
    return self._exec_single_context(
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1986, in _exec_single_context
    self._handle_dbapi_exception(
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2355, in _handle_dbapi_exception
    raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 951, in do_execute
    cursor.execute(statement, parameters)
  File "/usr/local/lib/python3.10/site-packages/pymysql/cursors.py", line 158, in execute
    result = self._query(query)
  File "/usr/local/lib/python3.10/site-packages/pymysql/cursors.py", line 325, in _query
    conn.query(q)
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 549, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 779, in _read_query_result
    result.read()
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 1164, in read
    self._read_result_packet(first_packet)
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 1240, in _read_result_packet
    self._read_rowdata_packet()
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 1274, in _read_rowdata_packet
    packet = self.connection._read_packet()
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 715, in _read_packet
    recv_data = self._read_bytes(bytes_to_read)
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 752, in _read_bytes
    raise err.OperationalError(
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query')
[SQL: select * from future_rank where date = '2025-09-11']
(Background on this error at: https://sqlalche.me/e/20/e3q8)
=========================================================================
2025-09-17 16:32:05 Wed	START TASK.01	future_1d  future_rank
=========================================================================
2025-09-17 16:32:14,328 - future_1d - INFO - future_rank check=True check_last=7 start...
2025-09-17 16:32:20,155 - future_1d - INFO - future_rank date = 2025-09-09
2025-09-17 16:32:20,249 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='GFEX) done
2025-09-17 16:32:20,447 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='CZCE) done
2025-09-17 16:32:21,288 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='DCE) done
2025-09-17 16:32:21,434 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='SHFE) done
2025-09-17 16:32:21,497 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='INE) done
2025-09-17 16:32:23,239 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='CFFEX) done
=========================================================================
2025-09-17 17:16:58 Wed	START TASK.01	future_1d  future_rank
=========================================================================
2025-09-17 17:17:00,146 - future_1d - INFO - future_rank check=True check_last=7 start...
2025-09-17 17:17:00,234 - future_1d - INFO - future_rank date = 2025-09-09
2025-09-17 17:17:00,425 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='CZCE) done
2025-09-17 17:17:00,504 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='GFEX) done
2025-09-17 17:17:00,607 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='CFFEX) done
2025-09-17 17:17:00,678 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='INE) done
2025-09-17 17:17:00,826 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='SHFE) done
2025-09-17 17:17:00,996 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='DCE) done
2025-09-17 17:17:01,648 - future_1d - INFO - save future_rank 2025-09-09 completed
2025-09-17 17:17:08,204 - future_1d - INFO - future_rank date = 2025-09-10
2025-09-17 17:17:08,369 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='CZCE) done
2025-09-17 17:17:08,452 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='GFEX) done
2025-09-17 17:17:08,549 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='CFFEX) done
2025-09-17 17:17:08,617 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='INE) done
2025-09-17 17:17:08,751 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='SHFE) done
2025-09-17 17:17:08,875 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='DCE) done
2025-09-17 17:17:09,550 - future_1d - INFO - save future_rank 2025-09-10 completed
2025-09-17 17:17:17,268 - future_1d - INFO - future_rank date = 2025-09-11
2025-09-17 17:17:17,468 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='CZCE) done
2025-09-17 17:17:17,547 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='GFEX) done
2025-09-17 17:17:17,642 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='CFFEX) done
2025-09-17 17:17:17,724 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='INE) done
2025-09-17 17:17:17,863 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='SHFE) done
2025-09-17 17:17:18,024 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='DCE) done
2025-09-17 17:17:18,667 - future_1d - INFO - save future_rank 2025-09-11 completed
2025-09-17 17:17:23,782 - future_1d - INFO - future_rank date = 2025-09-12
2025-09-17 17:17:23,945 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='CZCE) done
2025-09-17 17:17:24,022 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='GFEX) done
2025-09-17 17:17:24,126 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='CFFEX) done
2025-09-17 17:17:24,194 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='INE) done
2025-09-17 17:17:24,362 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='SHFE) done
2025-09-17 17:17:24,496 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='DCE) done
2025-09-17 17:17:25,152 - future_1d - INFO - save future_rank 2025-09-12 add
2025-09-17 17:17:25,160 - future_1d - INFO -                                   3370  ...                        3374
date                        2025-09-12  ...                  2025-09-12
symbol                          si2511  ...                      si2511
broker                            中信期货  ...                        东证期货
vol                            87077.0  ...                     21447.0
vol_chg                       -11176.0  ...                     -7545.0
long_hld                       21403.0  ...                     11766.0
long_chg                       -1011.0  ...                     -1188.0
short_hld                      17383.0  ...                     10801.0
short_chg                       -134.0  ...                      -419.0
exchange                          GFEX  ...                        GFEX
variety                             si  ...                          si
comd                                si  ...                          si
created_at  2025-09-17 17:17:25.096547  ...  2025-09-17 17:17:25.096547
updated_at  2025-09-17 17:17:25.096992  ...  2025-09-17 17:17:25.096992

[14 rows x 5 columns]
2025-09-17 17:17:28,984 - future_1d - INFO - future_rank date = 2025-09-15
2025-09-17 17:17:29,148 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-15',exchange='CZCE) done
2025-09-17 17:17:29,258 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-15',exchange='GFEX) done
2025-09-17 17:17:29,341 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-15',exchange='CFFEX) done
2025-09-17 17:17:29,426 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-15',exchange='INE) done
2025-09-17 17:17:29,561 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-15',exchange='SHFE) done
2025-09-17 17:17:29,683 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-15',exchange='DCE) done
2025-09-17 17:17:30,655 - future_1d - INFO - save future_rank 2025-09-15 add
2025-09-17 17:17:30,663 - future_1d - INFO -                                      0  ...                           4
date                        2025-09-15  ...                  2025-09-15
symbol                          AP2510  ...                      AP2510
broker                        一德期货(代客)  ...                    中信期货(代客)
vol                              510.0  ...                      1508.0
vol_chg                          310.0  ...                      -306.0
long_hld                         396.0  ...                       506.0
long_chg                         113.0  ...                      -294.0
short_hld                          0.0  ...                       574.0
short_chg                          0.0  ...                      -302.0
exchange                          CZCE  ...                        CZCE
variety                             AP  ...                          AP
comd                                AP  ...                          AP
created_at  2025-09-17 17:17:29.804979  ...  2025-09-17 17:17:29.804979
updated_at  2025-09-17 17:17:29.805400  ...  2025-09-17 17:17:29.805400

[14 rows x 5 columns]
2025-09-17 17:17:35,963 - future_1d - INFO - future_rank date = 2025-09-16
2025-09-17 17:17:36,132 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-16',exchange='CZCE) done
2025-09-17 17:17:36,216 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-16',exchange='GFEX) done
2025-09-17 17:17:36,314 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-16',exchange='CFFEX) done
2025-09-17 17:17:36,379 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-16',exchange='INE) done
2025-09-17 17:17:36,553 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-16',exchange='SHFE) done
2025-09-17 17:17:36,718 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-16',exchange='DCE) done
2025-09-17 17:17:37,605 - future_1d - INFO - save future_rank 2025-09-16 add
2025-09-17 17:17:37,614 - future_1d - INFO -                                      0  ...                           4
date                        2025-09-16  ...                  2025-09-16
symbol                          AP2510  ...                      AP2510
broker                        一德期货(代客)  ...                    中信建投(代客)
vol                              178.0  ...                       155.0
vol_chg                         -332.0  ...                      -190.0
long_hld                         258.0  ...                         0.0
long_chg                        -138.0  ...                         0.0
short_hld                          0.0  ...                       280.0
short_chg                          0.0  ...                       -36.0
exchange                          CZCE  ...                        CZCE
variety                             AP  ...                          AP
comd                                AP  ...                          AP
created_at  2025-09-17 17:17:36.838045  ...  2025-09-17 17:17:36.838045
updated_at  2025-09-17 17:17:36.838478  ...  2025-09-17 17:17:36.838478

[14 rows x 5 columns]
2025-09-17 17:17:47,033 - future_1d - INFO - future_rank date = 2025-09-17
2025-09-17 17:17:47,232 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-17',exchange='CZCE) done
2025-09-17 17:17:47,322 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-17',exchange='GFEX) done
2025-09-17 17:17:47,411 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-17',exchange='CFFEX) done
2025-09-17 17:17:47,475 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-17',exchange='INE) done
2025-09-17 17:17:47,638 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-17',exchange='SHFE) done
2025-09-17 17:17:47,716 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-17',exchange='DCE) done
2025-09-17 17:17:48,382 - future_1d - INFO - save future_rank 2025-09-17 add
2025-09-17 17:17:48,389 - future_1d - INFO -                                      0  ...                           4
date                        2025-09-17  ...                  2025-09-17
symbol                          AP2510  ...                      AP2510
broker                        一德期货(代客)  ...                    中信期货(代客)
vol                                0.0  ...                       784.0
vol_chg                            0.0  ...                      -188.0
long_hld                         244.0  ...                       459.0
long_chg                         -14.0  ...                       -21.0
short_hld                          0.0  ...                       567.0
short_chg                          0.0  ...                       -35.0
exchange                          CZCE  ...                        CZCE
variety                             AP  ...                          AP
comd                                AP  ...                          AP
created_at  2025-09-17 17:17:47.812059  ...  2025-09-17 17:17:47.812059
updated_at  2025-09-17 17:17:47.812473  ...  2025-09-17 17:17:47.812473

[14 rows x 5 columns]
=========================================================================
2025-09-17 18:25:21 Wed	START TASK.01	future_1d  future_rank
=========================================================================
2025-09-17 18:25:23,734 - future_1d - INFO - future_rank check=True check_last=7 start...
2025-09-17 18:25:23,822 - future_1d - INFO - future_rank date = 2025-09-09
2025-09-17 18:25:23,965 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='DCE) done
2025-09-17 18:25:24,139 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='SHFE) done
2025-09-17 18:25:24,206 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='INE) done
2025-09-17 18:25:24,287 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='GFEX) done
2025-09-17 18:25:24,453 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='CZCE) done
2025-09-17 18:25:24,560 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='CFFEX) done
2025-09-17 18:25:25,218 - future_1d - INFO - save future_rank 2025-09-09 completed
2025-09-17 18:25:31,665 - future_1d - INFO - future_rank date = 2025-09-10
2025-09-17 18:25:31,784 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='DCE) done
2025-09-17 18:25:31,982 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='SHFE) done
2025-09-17 18:25:32,062 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='INE) done
2025-09-17 18:25:32,144 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='GFEX) done
2025-09-17 18:25:32,312 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='CZCE) done
2025-09-17 18:25:32,395 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='CFFEX) done
2025-09-17 18:25:33,067 - future_1d - INFO - save future_rank 2025-09-10 completed
2025-09-17 18:25:40,322 - future_1d - INFO - future_rank date = 2025-09-11
2025-09-17 18:25:40,462 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='DCE) done
2025-09-17 18:25:40,629 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='SHFE) done
2025-09-17 18:25:40,700 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='INE) done
2025-09-17 18:25:40,811 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='GFEX) done
2025-09-17 18:25:40,973 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='CZCE) done
2025-09-17 18:25:41,070 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='CFFEX) done
2025-09-17 18:25:41,735 - future_1d - INFO - save future_rank 2025-09-11 completed
2025-09-17 18:25:50,293 - future_1d - INFO - future_rank date = 2025-09-12
2025-09-17 18:25:50,432 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='DCE) done
2025-09-17 18:25:50,574 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='SHFE) done
2025-09-17 18:25:50,658 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='INE) done
2025-09-17 18:25:50,757 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='GFEX) done
2025-09-17 18:25:50,927 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='CZCE) done
2025-09-17 18:25:51,038 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='CFFEX) done
2025-09-17 18:25:51,719 - future_1d - INFO - save future_rank 2025-09-12 completed
2025-09-17 18:25:55,452 - future_1d - INFO - future_rank date = 2025-09-15
2025-09-17 18:25:55,585 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-15',exchange='DCE) done
2025-09-17 18:25:55,752 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-15',exchange='SHFE) done
2025-09-17 18:25:55,822 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-15',exchange='INE) done
2025-09-17 18:25:55,922 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-15',exchange='GFEX) done
2025-09-17 18:25:56,077 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-15',exchange='CZCE) done
2025-09-17 18:25:56,162 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-15',exchange='CFFEX) done
2025-09-17 18:25:56,793 - future_1d - INFO - save future_rank 2025-09-15 completed
2025-09-17 18:26:02,569 - future_1d - INFO - future_rank date = 2025-09-16
2025-09-17 18:26:02,726 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-16',exchange='DCE) done
2025-09-17 18:26:02,865 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-16',exchange='SHFE) done
2025-09-17 18:26:02,944 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-16',exchange='INE) done
2025-09-17 18:26:03,027 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-16',exchange='GFEX) done
2025-09-17 18:26:03,196 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-16',exchange='CZCE) done
2025-09-17 18:26:03,285 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-16',exchange='CFFEX) done
2025-09-17 18:26:03,897 - future_1d - INFO - save future_rank 2025-09-16 completed
2025-09-17 18:26:10,563 - future_1d - INFO - future_rank date = 2025-09-17
2025-09-17 18:26:10,649 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-17',exchange='DCE) done
2025-09-17 18:26:10,816 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-17',exchange='SHFE) done
2025-09-17 18:26:10,884 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-17',exchange='INE) done
2025-09-17 18:26:10,968 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-17',exchange='GFEX) done
2025-09-17 18:26:11,137 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-17',exchange='CZCE) done
2025-09-17 18:26:11,227 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-17',exchange='CFFEX) done
2025-09-17 18:26:11,763 - future_1d - INFO - save future_rank 2025-09-17 completed
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 736, in _read_bytes
    data = self._rfile.read(num_bytes)
  File "/usr/local/lib/python3.10/socket.py", line 705, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 951, in do_execute
    cursor.execute(statement, parameters)
  File "/usr/local/lib/python3.10/site-packages/pymysql/cursors.py", line 158, in execute
    result = self._query(query)
  File "/usr/local/lib/python3.10/site-packages/pymysql/cursors.py", line 325, in _query
    conn.query(q)
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 549, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 779, in _read_query_result
    result.read()
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 1164, in read
    self._read_result_packet(first_packet)
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 1240, in _read_result_packet
    self._read_rowdata_packet()
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 1274, in _read_rowdata_packet
    packet = self.connection._read_packet()
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 715, in _read_packet
    recv_data = self._read_bytes(bytes_to_read)
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 742, in _read_bytes
    raise err.OperationalError(
pymysql.err.OperationalError: (2013, 'Lost connection to MySQL server during query ([Errno 104] Connection reset by peer)')

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

Traceback (most recent call last):
  File "/root/project/future_1d/future_rank.py", line 8, in 
    client.save_future_rank(check=True, check_last=7)
  File "/root/project/future_1d/future1d_request.py", line 978, in save_future_rank
    df_db = pd.read_sql(f"select * from {tablebase.__tablename__} where date = '{td}'", self.engine)
  File "/usr/local/lib/python3.10/site-packages/pandas/io/sql.py", line 736, in read_sql
    return pandas_sql.read_query(
  File "/usr/local/lib/python3.10/site-packages/pandas/io/sql.py", line 1848, in read_query
    result = self.execute(sql, params)
  File "/usr/local/lib/python3.10/site-packages/pandas/io/sql.py", line 1671, in execute
    return self.con.exec_driver_sql(sql, *args)
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1779, in exec_driver_sql
    ret = self._execute_context(
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1846, in _execute_context
    return self._exec_single_context(
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1986, in _exec_single_context
    self._handle_dbapi_exception(
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2355, in _handle_dbapi_exception
    raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 951, in do_execute
    cursor.execute(statement, parameters)
  File "/usr/local/lib/python3.10/site-packages/pymysql/cursors.py", line 158, in execute
    result = self._query(query)
  File "/usr/local/lib/python3.10/site-packages/pymysql/cursors.py", line 325, in _query
    conn.query(q)
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 549, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 779, in _read_query_result
    result.read()
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 1164, in read
    self._read_result_packet(first_packet)
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 1240, in _read_result_packet
    self._read_rowdata_packet()
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 1274, in _read_rowdata_packet
    packet = self.connection._read_packet()
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 715, in _read_packet
    recv_data = self._read_bytes(bytes_to_read)
  File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 742, in _read_bytes
    raise err.OperationalError(
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query ([Errno 104] Connection reset by peer)')
[SQL: select * from future_rank where date = '2025-09-09']
(Background on this error at: https://sqlalche.me/e/20/e3q8)