ricequant / rqalpha

A extendable, replaceable Python algorithmic backtest && trading framework supporting multiple securities
http://rqalpha.io
Other
5.39k stars 1.62k forks source link

linux 下python 3.0.9版本跑样例报 'OutStream' object has no attribute 'buffer' #306

Closed hbbaiyu closed 6 years ago

hbbaiyu commented 6 years ago

详细信息如下:

RuntimeError Traceback (most recent call last) ~/anaconda3/lib/python3.6/site-packages/rqalpha/main.py in run(config, source_code, user_funcs) 200 if not env.data_source: --> 201 env.set_data_source(BaseDataSource(config.base.data_bundle_path)) 202 env.set_data_proxy(DataProxy(env.data_source))

~/anaconda3/lib/python3.6/site-packages/rqalpha/data/base_data_source.py in init(self, path) 43 if not os.path.exists(path): ---> 44 raise RuntimeError('bundle path {} not exist'.format(os.path.abspath)) 45

RuntimeError: bundle path <function abspath at 0x7efc836cdae8> not exist

During handling of the above exception, another exception occurred:

AttributeError Traceback (most recent call last)

in () 56 context.fired = True 57 ---> 58 results = run_func(init=init, handle_bar=handle_bar, config=config) ~/anaconda3/lib/python3.6/site-packages/rqalpha/__init__.py in run_func(**kwargs) 141 config = parse_config(config, user_funcs=user_funcs) 142 clear_all_cached_functions() --> 143 return main.run(config, user_funcs=user_funcs) 144 145 ~/anaconda3/lib/python3.6/site-packages/rqalpha/main.py in run(config, source_code, user_funcs) 313 user_exc = create_custom_exception(exc_type, exc_val, exc_tb, config.base.strategy_file) 314 --> 315 code = _exception_handler(user_exc) 316 mod_handler.tear_down(code, user_exc) 317 else: ~/anaconda3/lib/python3.6/site-packages/rqalpha/main.py in _exception_handler(e) 324 325 def _exception_handler(e): --> 326 better_exceptions.excepthook(e.error.exc_type, e.error.exc_val, e.error.exc_tb) 327 user_system_log.error(e.error) 328 if not is_user_exc(e.error.exc_val): ~/anaconda3/lib/python3.6/site-packages/better_exceptions/__init__.py in excepthook(exc, value, tb) 342 def excepthook(exc, value, tb): 343 formatted = format_exception(exc, value, tb) --> 344 write_stream(formatted) 345 346 ~/anaconda3/lib/python3.6/site-packages/better_exceptions/__init__.py in write_stream(data) 323 324 if PY3: --> 325 STREAM.buffer.write(data) 326 else: 327 STREAM.write(data) AttributeError: 'OutStream' object has no attribute 'buffer'
Cuizi7 commented 6 years ago

报错原因是 bundle path <function abspath at 0x7efc836cdae8> not exist,检查下传入的 bundle 目录或者默认的 bundle 目录是否存在。

Cuizi7 commented 6 years ago

no reply, closed.