Skip to content
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

获取开放型基金净值数据 错误 #758

Open
gusibi opened this issue Sep 30, 2018 · 3 comments · May be fixed by #766
Open

获取开放型基金净值数据 错误 #758

gusibi opened this issue Sep 30, 2018 · 3 comments · May be fixed by #766

Comments

@gusibi
Copy link

gusibi commented Sep 30, 2018

https://github.com/waditu/tushare/blob/master/tushare/fund/nav.py#L76

2018-09-30 11 28 01

这里直接 return fund_dfs 可以修复此问题

@gusibi
Copy link
Author

gusibi commented Oct 8, 2018

https://github.com/waditu/tushare/blob/master/tushare/fund/nav.py#L64

如果这里请求超时

nums = _get_fund_num(ct.SINA_NAV_COUNT_URL %
                             (ct.P_TYPE['http'], ct.DOMAINS['vsf'],
                              ct.NAV_OPEN_KEY[fund_type],
                              ct.NAV_OPEN_API[fund_type],
                              ct.NAV_OPEN_T2[fund_type],
                              ct.NAV_OPEN_T3))

nums 为 None limit_cnt = int(nums/pages)+1 会抛出

TypeError: unsupported operand type(s) for /: 'NoneType' and 'int' 异常

@jimmysoa
Copy link
Member

jimmysoa commented Oct 8, 2018

可直接提供pull request

gusibi added a commit to gusibi/tushare that referenced this issue Oct 9, 2018
@gusibi gusibi linked a pull request Oct 9, 2018 that will close this issue
@gusibi
Copy link
Author

gusibi commented Oct 9, 2018

已提交

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants