ricequant / rqalpha

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

update bundle报错OSError: Invalid data stream #448

Closed GIS-PuppetMaster closed 4 years ago

GIS-PuppetMaster commented 5 years ago

提 ISSUE 须知

请先阅读文档 rqalpha文档

如果仍有问题的话请在 issue列表 中寻找是否有相关问题的解决方案

如果没有的话 麻烦开一个issue 描述以下问题:

1. RQAlpha的版本

3.4.0

2. Python的版本

3.7

3. 是Windows/Linux/MacOS or others?

Windows 10 1903

4. 您出现问题对应的源码/或者能复现问题的简易代码 以及对应的配置

rqalpha update-bundle

5. 您出现的错误堆栈日志信息

[WARNING]
目标数据源路径 C:\Users\zkx74\.rqalpha\bundle\ 不为空
更新操作首先会清空该文件件下所有内容
您确定要继续吗?
 [y/N]: y
尝试 http://7xjci3.com1.z0.glb.clouddn.com/bundles_v3/rqbundle_20190918.tar.bz2 ...
尝试 http://7xjci3.com1.z0.glb.clouddn.com/bundles_v3/rqbundle_20190917.tar.bz2 ...
下载中 ...  [####################################]  100%
Traceback (most recent call last):
  File "c:\users\zkx74\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\zkx74\anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\zkx74\Anaconda3\Scripts\rqalpha.exe\__main__.py", line 9, in <module>
  File "c:\users\zkx74\anaconda3\lib\site-packages\rqalpha\__main__.py", line 73, in entry_point
    cli(obj={})
  File "c:\users\zkx74\anaconda3\lib\site-packages\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\zkx74\anaconda3\lib\site-packages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "c:\users\zkx74\anaconda3\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\zkx74\anaconda3\lib\site-packages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\zkx74\anaconda3\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "c:\users\zkx74\anaconda3\lib\site-packages\rqalpha\__main__.py", line 84, in update_bundle
    rqalpha.utils.bundle_helper.update_bundle(data_bundle_path, locale)
  File "c:\users\zkx74\anaconda3\lib\site-packages\rqalpha\utils\bundle_helper.py", line 92, in update_bundle
    tar.extractall(data_bundle_path)
  File "c:\users\zkx74\anaconda3\lib\tarfile.py", line 2002, in extractall
    numeric_owner=numeric_owner)
  File "c:\users\zkx74\anaconda3\lib\tarfile.py", line 2044, in extract
    numeric_owner=numeric_owner)
  File "c:\users\zkx74\anaconda3\lib\tarfile.py", line 2114, in _extract_member
    self.makefile(tarinfo, targetpath)
  File "c:\users\zkx74\anaconda3\lib\tarfile.py", line 2163, in makefile
    copyfileobj(source, target, tarinfo.size, ReadError, bufsize)
  File "c:\users\zkx74\anaconda3\lib\tarfile.py", line 247, in copyfileobj
    buf = src.read(bufsize)
  File "c:\users\zkx74\anaconda3\lib\bz2.py", line 178, in read
    return self._buffer.read(size)
  File "c:\users\zkx74\anaconda3\lib\_compression.py", line 68, in readinto
    data = self.read(len(byte_view))
  File "c:\users\zkx74\anaconda3\lib\_compression.py", line 103, in read
    data = self._decompressor.decompress(rawblock, size)
OSError: Invalid data stream
GIS-PuppetMaster commented 5 years ago

import bcolz 没有报错

Cuizi7 commented 4 years ago

将rqalpha 跟新至最新版本并重新下载数据可以复现该问题吗?

Cuizi7 commented 4 years ago

将rqalpha 跟新至最新版本并重新下载数据可以复现该问题吗?

hzliu commented 4 years ago

应该只是bundle下载失败

lycanthropes commented 2 years ago

请问最后楼主最后是怎么解决的呢?