vn.py量化社区
By Traders, For Traders.
Member
avatar
加入于:
帖子: 1
声望: 0

2019-07-13 16:10:31.875661 开始加载历史数据

OperationalError Traceback (most recent call last)
d:\vnstudio\lib\site-packages\peewee.py in execute_sql(self, sql, params, commit)
2948 try:
-> 2949 cursor.execute(sql, params or ())
2950 except Exception:

OperationalError: no such column: t1.open_interest

During handling of the above exception, another exception occurred:

OperationalError Traceback (most recent call last)

<ipython-input-3-06c0f59cbee0> in <module>
1 #%%
----> 2 engine.load_data()
3 engine.run_backtesting()
4 df = engine.calculate_result()
5 engine.calculate_statistics()

d:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\backtesting.py in load_data(self)
238 self.interval,
239 start,
--> 240 end
241 )
242 else:

d:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\backtesting.py in load_bar_data(symbol, exchange, interval, start, end)
1208 """"""
1209 return database_manager.load_bar_data(
-> 1210 symbol, exchange, interval, start, end
1211 )
1212

d:\vnstudio\lib\site-packages\vnpy\trader\database\database_sql.py in load_bar_data(self, symbol, exchange, interval, start, end)
350 .order_by(self.class_bar.datetime)
351 )
--> 352 data = [db_bar.to_bar() for db_bar in s]
353 return data
354

d:\vnstudio\lib\site-packages\peewee.py in iter(self)
6484 def iter(self):
6485 if not self._cursor_wrapper:
-> 6486 self.execute()
6487 return iter(self._cursor_wrapper)
6488

d:\vnstudio\lib\site-packages\peewee.py in inner(self, database, args, **kwargs)
1783 raise InterfaceError('Query must be bound to a database in order '
1784 'to call "%s".' % method.name)
-> 1785 return method(self, database,
args, **kwargs)
1786 return inner
1787

d:\vnstudio\lib\site-packages\peewee.py in execute(self, database)
1854 @database_required
1855 def execute(self, database):
-> 1856 return self._execute(database)
1857
1858 def _execute(self, database):

d:\vnstudio\lib\site-packages\peewee.py in _execute(self, database)
2025 def _execute(self, database):
2026 if self._cursor_wrapper is None:
-> 2027 cursor = database.execute(self)
2028 self._cursor_wrapper = self._get_cursor_wrapper(cursor)
2029 return self._cursor_wrapper

d:\vnstudio\lib\site-packages\peewee.py in execute(self, query, commit, context_options)
2960 ctx = self.get_sql_context(
context_options)
2961 sql, params = ctx.sql(query).query()
-> 2962 return self.execute_sql(sql, params, commit=commit)
2963
2964 def get_context_options(self):

d:\vnstudio\lib\site-packages\peewee.py in execute_sql(self, sql, params, commit)
2954 else:
2955 if commit and not self.in_transaction():
-> 2956 self.commit()
2957 return cursor
2958

d:\vnstudio\lib\site-packages\peewee.py in exit(self, exc_type, exc_value, traceback)
2730 new_type = self.exceptions[exc_type.name]
2731 exc_args = exc_value.args
-> 2732 reraise(new_type, new_type(*exc_args), traceback)
2733
2734

d:\vnstudio\lib\site-packages\peewee.py in reraise(tp, value, tb)
181 def reraise(tp, value, tb=None):
182 if value.traceback is not tb:
--> 183 raise value.with_traceback(tb)
184 raise value
185

d:\vnstudio\lib\site-packages\peewee.py in execute_sql(self, sql, params, commit)
2947 cursor = self.cursor(commit)
2948 try:
-> 2949 cursor.execute(sql, params or ())
2950 except Exception:
2951 if self.autorollback and not self.in_transaction():

OperationalError: no such column: t1.open_interest

Administrator
avatar
加入于:
帖子: 1888
声望: 85

用这个脚本升级数据库:https://download.vnpy.com/script_2_0_4.py

© 2015-2019 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号-3