Traceback (most recent call last):
File "D:\vnstudio\lib\site-packages\pymysql\connections.py", line 756, in _write_bytes
self._sock.sendall(data)
ConnectionAbortedError: [WinError 10053] 你的主机中的软件中止了一个已建立的连接。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\vnstudio\lib\site-packages\peewee.py", line 3129, in execute_sql
cursor.execute(sql, params or ())
File "D:\vnstudio\lib\site-packages\pymysql\cursors.py", line 148, in execute
result = self._query(query)
File "D:\vnstudio\lib\site-packages\pymysql\cursors.py", line 310, in _query
conn.query(q)
File "D:\vnstudio\lib\site-packages\pymysql\connections.py", line 547, in query
self._execute_command(COMMAND.COM_QUERY, sql)
File "D:\vnstudio\lib\site-packages\pymysql\connections.py", line 814, in _execute_command
self._write_bytes(packet)
File "D:\vnstudio\lib\site-packages\pymysql\connections.py", line 760, in _write_bytes
CR.CR_SERVER_GONE_ERROR, "MySQL server has gone away (%r)" % (e,)
pymysql.err.OperationalError: (2006, "MySQL server has gone away (ConnectionAbortedError(10053, '你的主机中的软件中止了一个已建立的连接。', None, 10053, None))")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\vnstudio\lib\site-packages\vnpy\database\mysql\mysql_database.py", line 35, in execute_sql
cursor = super(RetryOperationalError, self).execute_sql(sql, params, commit)
File "D:\vnstudio\lib\site-packages\peewee.py", line 3136, in execute_sql
self.commit()
File "D:\vnstudio\lib\site-packages\peewee.py", line 2902, in exit
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "D:\vnstudio\lib\site-packages\peewee.py", line 185, in reraise
raise value.with_traceback(tb)
File "D:\vnstudio\lib\site-packages\peewee.py", line 3129, in execute_sql
cursor.execute(sql, params or ())
File "D:\vnstudio\lib\site-packages\pymysql\cursors.py", line 148, in execute
result = self._query(query)
File "D:\vnstudio\lib\site-packages\pymysql\cursors.py", line 310, in _query
conn.query(q)
File "D:\vnstudio\lib\site-packages\pymysql\connections.py", line 547, in query
self._execute_command(COMMAND.COM_QUERY, sql)
File "D:\vnstudio\lib\site-packages\pymysql\connections.py", line 814, in _execute_command
self._write_bytes(packet)
File "D:\vnstudio\lib\site-packages\pymysql\connections.py", line 760, in _write_bytes
CR.CR_SERVER_GONE_ERROR, "MySQL server has gone away (%r)" % (e,)
peewee.OperationalError: (2006, "MySQL server has gone away (ConnectionAbortedError(10053, '你的主机中的软件中止了一个已建立的连接。', None, 10053, None))")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\vnstudio\lib\site-packages\vnpy\database\mysql\mysql_database.py", line 185, in save_bar_data
DbBarData.insert_many(c).on_conflict_replace().execute()
File "D:\vnstudio\lib\site-packages\peewee.py", line 1898, in inner
return method(self, database, *args, **kwargs)
File "D:\vnstudio\lib\site-packages\peewee.py", line 1969, in execute
return self._execute(database)
File "D:\vnstudio\lib\site-packages\peewee.py", line 2730, in _execute
return super(Insert, self)._execute(database)
File "D:\vnstudio\lib\site-packages\peewee.py", line 2465, in _execute
cursor = database.execute(self)
File "D:\vnstudio\lib\site-packages\peewee.py", line 3142, in execute
return self.execute_sql(sql, params, commit=commit)
File "D:\vnstudio\lib\site-packages\vnpy\database\mysql\mysql_database.py", line 38, in execute_sql
self.close()
File "D:\vnstudio\lib\site-packages\peewee.py", line 3083, in close
raise OperationalError('Attempting to close database while '
peewee.OperationalError: Attempting to close database while transaction is open.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\vnstudio\lib\site-packages\peewee.py", line 3286, in rollback
return self._state.conn.rollback()
File "D:\vnstudio\lib\site-packages\pymysql\connections.py", line 479, in rollback
self._execute_command(COMMAND.COM_QUERY, "ROLLBACK")
File "D:\vnstudio\lib\site-packages\pymysql\connections.py", line 793, in _execute_command
raise err.InterfaceError(0, "")
pymysql.err.InterfaceError: (0, '')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\vnstudio\lib\site-packages\vnpy\app\data_manager\ui\widget.py", line 591, in download
count = self.engine.download_bar_data(symbol, exchange, interval, start)
File "D:\vnstudio\lib\site-packages\vnpy\app\data_manager\engine.py", line 206, in download_bar_data
database_manager.save_bar_data(data)
File "D:\vnstudio\lib\site-packages\vnpy\database\mysql\mysql_database.py", line 185, in save_bar_data
DbBarData.insert_many(c).on_conflict_replace().execute()
File "D:\vnstudio\lib\site-packages\peewee.py", line 4158, in exit
return self._helper.exit(exc_type, exc_val, exc_tb)
File "D:\vnstudio\lib\site-packages\peewee.py", line 4189, in exit
self.rollback(False)
File "D:\vnstudio\lib\site-packages\peewee.py", line 4176, in rollback
self.db.rollback()
File "D:\vnstudio\lib\site-packages\peewee.py", line 3286, in rollback
return self._state.conn.rollback()
File "D:\vnstudio\lib\site-packages\peewee.py", line 2902, in exit
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "D:\vnstudio\lib\site-packages\peewee.py", line 185, in reraise
raise value.with_traceback(tb)
File "D:\vnstudio\lib\site-packages\peewee.py", line 3286, in rollback
return self._state.conn.rollback()
File "D:\vnstudio\lib\site-packages\pymysql\connections.py", line 479, in rollback
self._execute_command(COMMAND.COM_QUERY, "ROLLBACK")
File "D:\vnstudio\lib\site-packages\pymysql\connections.py", line 793, in _execute_command
raise err.InterfaceError(0, "")
peewee.InterfaceError: (0, '')
参考这个网页中的修改还是一样