Traceback (most recent call last):
File "/home/richman/fundbot/./bot.py", line 36, in <module>
nonebot.run(app="bot:app")
File "/home/richman/fundbot/venv/lib/python3.9/site-packages/nonebot/__init__.py", line 217, in run
get_driver().run(host, port, *args, **kwargs)
File "/home/richman/fundbot/venv/lib/python3.9/site-packages/nonebot/drivers/fastapi.py", line 118, in run
uvicorn.run(app or self.server_app,
File "/home/richman/fundbot/venv/lib/python3.9/site-packages/uvicorn/main.py", line 362, in run
server.run()
File "/home/richman/fundbot/venv/lib/python3.9/site-packages/uvicorn/main.py", line 390, in run
loop.run_until_complete(self.serve(sockets=sockets))
> File "/home/richman/fundbot/venv/lib/python3.9/site-packages/nonebot/message.py", line 170, in _run_matcher
await matcher.run(bot, event, state)
File "/home/richman/fundbot/venv/lib/python3.9/site-packages/nonebot/matcher.py", line 496, in run
await self.run_handler(handler, bot, event, state_)
File "/home/richman/fundbot/venv/lib/python3.9/site-packages/nonebot/matcher.py", line 481, in run_handler
await handler(
File "fundbot/plugins/fund/fund.py", line 21, in handle_fund
result = result + (await data_source.get_fund_data(args[0]))
File "fundbot/plugins/fund/data_source.py", line 48, in get_fund_data
data = decode_fund_data(r)
File "fundbot/plugins/fund/data_source.py", line 58, in decode_fund_data
return eval(data[8:-2])
File "<string>", line 1
{"fundcode":"000384","name":"¸»¹úºãÀû·Ö¼¶Õ®È¯B","jzrq":"2015-12-09","dwjz":"1.0060","gsz":"1.0063","gszzl":"0.03","gztime":"2015-12-10 15:00"});
^
SyntaxError: unmatched ')'
Summary: 偶然会出现无法获取基金数据的情况
Details 具体错误为eval错误,可能是没有正确处理爬去到的字符串
Step to Reproduce; 无法控制,概率出现
Bug Traceback: