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

Handle excpetion when parsing json string #1223

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zhangyuting
Copy link

代码逻辑没有判断是否json string解析成功,直接在之后访问解析后的数据。在通过一些VPN访问tushare的时候,会导致requests返回的不是正常的json string,从而导致直接向用户抛出了内部的json解析错误堆栈。

修复方案是catch住这个exception,然后query函数返回None。

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 this pull request may close these issues.

None yet

1 participant