=========================================================================
2025-09-12 16:25:23 Fri START TASK.01 future_1d future_rank
=========================================================================
2025-09-12 16:25:55,655 - future_1d - INFO - future_rank check=True check_last=7 start...
2025-09-12 16:25:59,877 - future_1d - INFO - future_rank date = 2025-09-04
2025-09-12 16:26:00,074 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='CZCE) done
2025-09-12 16:26:00,167 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='CFFEX) done
2025-09-12 16:26:00,236 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='INE) done
2025-09-12 16:26:00,398 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='SHFE) done
2025-09-12 16:26:00,781 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='DCE) done
2025-09-12 16:26:00,881 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='GFEX) done
2025-09-12 16:28:33,235 - future_1d - INFO - save future_rank 2025-09-04 completed
2025-09-12 16:28:36,296 - future_1d - INFO - future_rank date = 2025-09-05
2025-09-12 16:28:36,495 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='CZCE) done
2025-09-12 16:28:36,615 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='CFFEX) done
2025-09-12 16:28:36,696 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='INE) done
2025-09-12 16:28:36,857 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='SHFE) done
2025-09-12 16:28:36,989 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='DCE) done
2025-09-12 16:28:37,091 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='GFEX) done
2025-09-12 16:29:56,908 - future_1d - INFO - save future_rank 2025-09-05 completed
2025-09-12 16:30:05,535 - future_1d - INFO - future_rank date = 2025-09-08
2025-09-12 16:30:05,741 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='CZCE) done
2025-09-12 16:30:05,864 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='CFFEX) done
2025-09-12 16:30:05,948 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='INE) done
2025-09-12 16:30:06,114 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='SHFE) done
2025-09-12 16:30:06,371 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='DCE) done
2025-09-12 16:30:06,552 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='GFEX) done
2025-09-12 16:33:38,977 - future_1d - INFO - save future_rank 2025-09-08 completed
2025-09-12 16:33:47,636 - future_1d - INFO - future_rank date = 2025-09-09
2025-09-12 16:33:47,798 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='CZCE) done
2025-09-12 16:33:47,899 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='CFFEX) done
2025-09-12 16:33:47,965 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='INE) done
2025-09-12 16:33:48,107 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='SHFE) done
2025-09-12 16:33:48,233 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='DCE) done
2025-09-12 16:33:48,335 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='GFEX) done
2025-09-12 16:37:14,543 - future_1d - INFO - save future_rank 2025-09-09 completed
2025-09-12 16:37:17,636 - future_1d - INFO - future_rank date = 2025-09-10
2025-09-12 16:37:19,452 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='CZCE) done
2025-09-12 16:37:21,179 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='CFFEX) done
2025-09-12 16:37:21,261 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='INE) done
2025-09-12 16:37:21,390 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='SHFE) done
2025-09-12 16:37:21,511 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='DCE) done
2025-09-12 16:37:21,588 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='GFEX) done
=========================================================================
2025-09-12 17:10:56 Fri START TASK.01 future_1d future_rank
=========================================================================
2025-09-12 17:11:12,313 - future_1d - INFO - future_rank check=True check_last=7 start...
2025-09-12 17:11:17,925 - future_1d - INFO - future_rank date = 2025-09-04
2025-09-12 17:11:17,996 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='INE) done
2025-09-12 17:11:18,163 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='SHFE) done
2025-09-12 17:11:19,065 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='CZCE) done
2025-09-12 17:11:19,234 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='DCE) done
2025-09-12 17:11:19,328 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='GFEX) done
2025-09-12 17:11:23,041 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='CFFEX) done
2025-09-12 17:12:57,081 - future_1d - INFO - save future_rank 2025-09-04 completed
2025-09-12 17:13:02,342 - future_1d - INFO - future_rank date = 2025-09-05
2025-09-12 17:13:03,143 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='INE) done
2025-09-12 17:13:03,301 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='SHFE) done
2025-09-12 17:13:03,727 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='CZCE) done
2025-09-12 17:13:03,851 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='DCE) done
2025-09-12 17:13:03,945 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='GFEX) done
2025-09-12 17:13:05,044 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='CFFEX) done
2025-09-12 17:15:35,501 - future_1d - INFO - save future_rank 2025-09-05 completed
2025-09-12 17:15:38,945 - future_1d - INFO - future_rank date = 2025-09-08
2025-09-12 17:15:39,009 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='INE) done
2025-09-12 17:15:39,401 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='SHFE) done
2025-09-12 17:15:39,639 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='CZCE) done
2025-09-12 17:15:39,772 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='DCE) done
2025-09-12 17:15:39,876 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='GFEX) done
2025-09-12 17:15:39,989 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='CFFEX) done
2025-09-12 17:18:20,770 - future_1d - INFO - save future_rank 2025-09-08 completed
2025-09-12 17:18:24,433 - future_1d - INFO - future_rank date = 2025-09-09
2025-09-12 17:18:24,524 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='INE) done
2025-09-12 17:18:24,683 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='SHFE) done
2025-09-12 17:18:24,880 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='CZCE) done
2025-09-12 17:18:25,046 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='DCE) done
2025-09-12 17:18:25,154 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='GFEX) done
2025-09-12 17:18:25,248 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='CFFEX) done
2025-09-12 17:21:00,710 - future_1d - INFO - save future_rank 2025-09-09 completed
2025-09-12 17:21:08,023 - future_1d - INFO - future_rank date = 2025-09-10
2025-09-12 17:21:08,823 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='INE) done
2025-09-12 17:21:09,667 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='SHFE) done
2025-09-12 17:21:09,843 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='CZCE) done
2025-09-12 17:21:11,635 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='DCE) done
2025-09-12 17:21:11,715 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='GFEX) done
2025-09-12 17:21:11,799 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='CFFEX) done
2025-09-12 17:23:39,421 - future_1d - INFO - save future_rank 2025-09-10 completed
2025-09-12 17:23:42,954 - future_1d - INFO - future_rank date = 2025-09-11
2025-09-12 17:23:43,022 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='INE) done
2025-09-12 17:23:43,163 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='SHFE) done
2025-09-12 17:23:43,340 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='CZCE) done
2025-09-12 17:23:43,496 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='DCE) done
2025-09-12 17:23:43,584 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='GFEX) done
2025-09-12 17:23:43,699 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='CFFEX) done
2025-09-12 17:25:23,482 - future_1d - INFO - save future_rank 2025-09-11 add
2025-09-12 17:25:23,491 - future_1d - INFO - 6423 ... 6427
date 2025-09-11 ... 2025-09-11
symbol PP2511 ... PP2511
broker 国泰君安(代客) ... 方正中期(代客)
vol 1920.0 ... 865.0
vol_chg 247.0 ... -25.0
long_hld 3923.0 ... 3266.0
long_chg 480.0 ... -189.0
short_hld 7711.0 ... 3302.0
short_chg 938.0 ... -148.0
exchange DCE ... DCE
variety PP ... PP
comd pp ... pp
created_at 2025-09-12 17:25:15.541048 ... 2025-09-12 17:25:15.541048
updated_at 2025-09-12 17:25:15.541473 ... 2025-09-12 17:25:15.541473
[14 rows x 5 columns]
2025-09-12 17:25:29,227 - future_1d - INFO - future_rank date = 2025-09-12
2025-09-12 17:25:29,313 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='INE) done
2025-09-12 17:25:29,488 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='SHFE) done
2025-09-12 17:25:29,674 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='CZCE) done
2025-09-12 17:25:29,756 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='DCE) done
2025-09-12 17:25:29,847 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='GFEX) done
2025-09-12 17:25:29,953 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='CFFEX) done
2025-09-12 17:26:31,190 - future_1d - INFO - save future_rank 2025-09-12 add
2025-09-12 17:26:31,198 - future_1d - INFO - 0 ... 4
date 2025-09-12 ... 2025-09-12
symbol AD ... AD2511
broker 期货公司会员/境外特殊经纪参与者 ... 东证期货
vol 13732.0 ... 268.0
vol_chg 1004.0 ... 17.0
long_hld 16447.0 ... 743.0
long_chg 2435.0 ... 24.0
short_hld 16447.0 ... 676.0
short_chg 2435.0 ... 8.0
exchange SHFE ... SHFE
variety AD ... AD
comd ad ... ad
created_at 2025-09-12 17:25:30.055702 ... 2025-09-12 17:25:30.055702
updated_at 2025-09-12 17:25:30.056154 ... 2025-09-12 17:25:30.056154
[14 rows x 5 columns]
=========================================================================
2025-09-12 18:25:40 Fri START TASK.01 future_1d future_rank
=========================================================================
2025-09-12 18:26:11,320 - future_1d - INFO - future_rank check=True check_last=7 start...
2025-09-12 18:26:13,224 - future_1d - INFO - future_rank date = 2025-09-04
2025-09-12 18:26:13,331 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='GFEX) done
2025-09-12 18:26:13,396 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='INE) done
2025-09-12 18:26:13,527 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='DCE) done
2025-09-12 18:26:13,630 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='CFFEX) done
2025-09-12 18:26:13,805 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='CZCE) done
2025-09-12 18:26:13,946 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',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-04']
(Background on this error at: https://sqlalche.me/e/20/e3q8)
=========================================================================
2025-09-12 18:28:38 Fri START TASK.01 future_1d future_rank
=========================================================================
2025-09-12 18:28:46,539 - future_1d - INFO - future_rank check=True check_last=7 start...
2025-09-12 18:29:00,330 - future_1d - INFO - future_rank date = 2025-09-04
2025-09-12 18:29:00,534 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='CZCE) done
2025-09-12 18:29:00,621 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='GFEX) done
2025-09-12 18:29:00,699 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='INE) done
2025-09-12 18:29:00,785 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='CFFEX) done
2025-09-12 18:29:00,918 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='DCE) done
2025-09-12 18:29:01,094 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='SHFE) done
2025-09-12 18:31:15,940 - future_1d - INFO - save future_rank 2025-09-04 completed
2025-09-12 18:31:22,747 - future_1d - INFO - future_rank date = 2025-09-05
2025-09-12 18:31:22,935 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='CZCE) done
2025-09-12 18:31:24,640 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='GFEX) done
2025-09-12 18:31:24,733 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='INE) done
2025-09-12 18:31:24,871 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='CFFEX) done
2025-09-12 18:31:25,012 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='DCE) done
2025-09-12 18:31:25,180 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='SHFE) done
2025-09-12 18:32:24,565 - future_1d - INFO - save future_rank 2025-09-05 completed
2025-09-12 18:32:33,314 - future_1d - INFO - future_rank date = 2025-09-08
2025-09-12 18:32:33,492 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='CZCE) done
2025-09-12 18:32:33,598 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='GFEX) done
2025-09-12 18:32:35,354 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='INE) done
2025-09-12 18:32:35,457 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='CFFEX) done
2025-09-12 18:32:35,607 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='DCE) done
2025-09-12 18:32:35,793 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='SHFE) done
2025-09-12 18:35:50,033 - future_1d - INFO - save future_rank 2025-09-08 completed
2025-09-12 18:35:58,331 - future_1d - INFO - future_rank date = 2025-09-09
2025-09-12 18:35:58,575 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='CZCE) done
2025-09-12 18:35:58,673 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='GFEX) done
2025-09-12 18:35:59,466 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='INE) done
2025-09-12 18:35:59,574 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='CFFEX) done
2025-09-12 18:35:59,773 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='DCE) done
2025-09-12 18:35:59,923 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',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-09']
(Background on this error at: https://sqlalche.me/e/20/e3q8)
=========================================================================
2025-09-12 18:40:54 Fri START TASK.01 future_1d future_rank
=========================================================================
2025-09-12 18:41:24,851 - future_1d - INFO - future_rank check=True check_last=7 start...
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-10']
(Background on this error at: https://sqlalche.me/e/20/e3q8)
2025-09-12 18:41:48,058 - future_1d - INFO - future_rank date = 2025-09-04
2025-09-12 18:41:48,162 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='GFEX) done
2025-09-12 18:41:48,329 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='DCE) done
2025-09-12 18:41:48,441 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='CFFEX) done
2025-09-12 18:41:48,621 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='CZCE) done
2025-09-12 18:41:48,752 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='SHFE) done
2025-09-12 18:41:48,820 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='INE) done
2025-09-12 18:43:40,358 - future_1d - INFO - save future_rank 2025-09-04 completed
2025-09-12 18:43:45,300 - future_1d - INFO - future_rank date = 2025-09-05
2025-09-12 18:43:45,387 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='GFEX) done
2025-09-12 18:43:45,524 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='DCE) done
2025-09-12 18:43:45,623 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='CFFEX) done
2025-09-12 18:43:45,794 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='CZCE) done
2025-09-12 18:43:45,969 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='SHFE) done
2025-09-12 18:43:46,037 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='INE) done
2025-09-12 18:45:49,009 - future_1d - INFO - save future_rank 2025-09-05 completed
2025-09-12 18:45:56,376 - future_1d - INFO - future_rank date = 2025-09-08
2025-09-12 18:45:56,469 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='GFEX) done
2025-09-12 18:45:56,631 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='DCE) done
2025-09-12 18:45:56,757 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='CFFEX) done
2025-09-12 18:45:56,949 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='CZCE) done
2025-09-12 18:45:57,091 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='SHFE) done
2025-09-12 18:45:57,175 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='INE) done
=========================================================================
2025-09-12 19:26:09 Fri START TASK.01 future_1d future_rank
=========================================================================
2025-09-12 19:26:16,411 - future_1d - INFO - future_rank check=True check_last=7 start...
2025-09-12 19:26:26,883 - future_1d - INFO - future_rank date = 2025-09-04
2025-09-12 19:26:26,982 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='INE) done
2025-09-12 19:26:27,120 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='DCE) done
2025-09-12 19:26:27,293 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='SHFE) done
2025-09-12 19:26:27,470 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='CZCE) done
2025-09-12 19:26:28,292 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='GFEX) done
2025-09-12 19:26:28,382 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-04',exchange='CFFEX) done
2025-09-12 19:28:35,293 - future_1d - INFO - save future_rank 2025-09-04 completed
2025-09-12 19:28:44,305 - future_1d - INFO - future_rank date = 2025-09-05
2025-09-12 19:28:44,374 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='INE) done
2025-09-12 19:28:44,541 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='DCE) done
2025-09-12 19:28:44,670 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='SHFE) done
2025-09-12 19:28:44,826 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='CZCE) done
2025-09-12 19:28:44,925 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='GFEX) done
2025-09-12 19:28:45,021 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-05',exchange='CFFEX) done
2025-09-12 19:30:05,428 - future_1d - INFO - save future_rank 2025-09-05 completed
2025-09-12 19:30:11,040 - future_1d - INFO - future_rank date = 2025-09-08
2025-09-12 19:30:11,108 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='INE) done
2025-09-12 19:30:11,239 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='DCE) done
2025-09-12 19:30:11,408 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='SHFE) done
2025-09-12 19:30:11,611 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='CZCE) done
2025-09-12 19:30:12,415 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='GFEX) done
2025-09-12 19:30:12,513 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-08',exchange='CFFEX) done
2025-09-12 19:31:52,909 - future_1d - INFO - save future_rank 2025-09-08 completed
2025-09-12 19:31:58,665 - future_1d - INFO - future_rank date = 2025-09-09
2025-09-12 19:31:58,740 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='INE) done
2025-09-12 19:31:59,575 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='DCE) done
2025-09-12 19:31:59,746 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='SHFE) done
2025-09-12 19:32:00,668 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='CZCE) done
2025-09-12 19:32:01,464 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='GFEX) done
2025-09-12 19:32:02,287 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-09',exchange='CFFEX) done
2025-09-12 19:33:52,876 - future_1d - INFO - save future_rank 2025-09-09 completed
2025-09-12 19:34:02,669 - future_1d - INFO - future_rank date = 2025-09-10
2025-09-12 19:34:02,734 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='INE) done
2025-09-12 19:34:02,861 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='DCE) done
2025-09-12 19:34:02,987 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='SHFE) done
2025-09-12 19:34:03,854 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='CZCE) done
2025-09-12 19:34:03,937 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='GFEX) done
2025-09-12 19:34:04,021 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-10',exchange='CFFEX) done
2025-09-12 19:35:34,216 - future_1d - INFO - save future_rank 2025-09-10 completed
2025-09-12 19:35:43,485 - future_1d - INFO - future_rank date = 2025-09-11
2025-09-12 19:35:43,554 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='INE) done
2025-09-12 19:35:43,713 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='DCE) done
2025-09-12 19:35:43,859 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='SHFE) done
2025-09-12 19:35:44,026 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='CZCE) done
2025-09-12 19:35:44,118 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='GFEX) done
2025-09-12 19:35:44,209 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-11',exchange='CFFEX) done
2025-09-12 19:37:48,049 - future_1d - INFO - save future_rank 2025-09-11 completed
2025-09-12 19:37:55,627 - future_1d - INFO - future_rank date = 2025-09-12
2025-09-12 19:37:55,715 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='INE) done
2025-09-12 19:37:55,886 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='DCE) done
2025-09-12 19:37:56,028 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='SHFE) done
2025-09-12 19:37:56,226 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='CZCE) done
2025-09-12 19:37:56,305 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='GFEX) done
2025-09-12 19:37:56,399 - future_1d - INFO - pro.fut_holding(trade_date='2025-09-12',exchange='CFFEX) done
2025-09-12 19:39:30,240 - future_1d - INFO - save future_rank 2025-09-12 add
2025-09-12 19:39:30,249 - future_1d - INFO - 0 ... 4
date 2025-09-12 ... 2025-09-12
symbol PP2511 ... PP2511
broker 国泰君安(代客) ... 方正中期(代客)
vol 2230.0 ... 1396.0
vol_chg 310.0 ... 531.0
long_hld 4021.0 ... 3028.0
long_chg 98.0 ... -238.0
short_hld 7893.0 ... 3052.0
short_chg 182.0 ... -250.0
exchange DCE ... DCE
variety PP ... PP
comd pp ... pp
created_at 2025-09-12 19:39:28.852291 ... 2025-09-12 19:39:28.852291
updated_at 2025-09-12 19:39:28.852774 ... 2025-09-12 19:39:28.852774
[14 rows x 5 columns]
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-08']
(Background on this error at: https://sqlalche.me/e/20/e3q8)