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

KeyError: 'result #11

Open
azuredsky opened this issue Sep 19, 2022 · 2 comments
Open

KeyError: 'result #11

azuredsky opened this issue Sep 19, 2022 · 2 comments

Comments

@azuredsky
Copy link

run :python pinyin_timestamping.py 正在为您查询合肥的天气情况。今天是2020年2月24日,合肥市今天多云,最低温度9摄氏度,最高温度15摄氏度,微风。 henan

Traceback (most recent call last):
File "pinyin_timestamping.py", line 91, in
for item in res['result']:
KeyError: 'result

@iamhere1
Copy link

您好,后来解决了吗? 我也遇到这个错误,把res打印出来,发现没有"result"这个key,res结果如下:

{'text': '正在 为 您 查询 合肥 的 天气 情况 今天 是 二 零 二 零 年 二月 二十四日 合肥市 今天 多云 最低 温度 九 摄氏度 最高 温度 十 五 摄氏度 微风'}

@iamhere1
Copy link

看上去这里有解决方案:#2

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

No branches or pull requests

2 participants