New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
最近用get_k_data 获取的个股 如果在停牌时间内 出现IndexError: list index out of range #351
Comments
这个问题在 0.7.1上不会出现,一旦把版本升级到0.7.4 后就出现了。 同样的代码。只是对tushare版本进行了操作。 |
我的0.7.1也还是有这个问题。。 |
@aweiu 我试过几次,71时可以。 |
@robotJiang 是的,我确定。 |
试试0.7.5 |
@aweiu 我目前在获取get_k_data设置了异常处理。 可以避免程序退出。 |
@jimmysoa 0.75 现在正常了。 返回的是一个empty dataframe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
选一个目前停牌的个股,start的时间在停牌之后就会出现这个问题。 我以前没遇到过,是不是最近升级了的问题。 tushare版本0.7.4
File "/Users/rocky/Data/program/base_function/tushare_function.py", line 344, in check_k_data
df_x=ts.get_k_data(code=each_code,start='2017-03-01')
File "/Users/rocky/Library/Python/2.7/lib/python/site-packages/tushare/stock/trading.py", line 675, in get_k_data
retry_count, pause),
File "/Users/rocky/Library/Python/2.7/lib/python/site-packages/tushare/stock/trading.py", line 707, in _get_k_data
if len(js['data'][symbol][dataflag][0]) == 6:
IndexError: list index out of range
The text was updated successfully, but these errors were encountered: