You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "E:\setuna-bot.venv\Lib\site-packages\nonebot_plugin_shindan_init_.py", line 171, in handler
res = await make_shindan(shindan.id, name, shindan.mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\setuna-bot.venv\Lib\site-packages\nonebot_plugin_shindan\shindanmaker.py", line 112, in render_html
assert isinstance(result, Tag)
^^^^^^^^^^^^^^^^^^^^^^^
The text was updated successfully, but these errors were encountered:
运行最新版时当收到任意占卜指令时,bot直接返回:出错了,请稍后再试,出现报错
07-28 13:14:34 [WARNING] nonebot_plugin_shindan | Traceback (most recent call last):
File "E:\setuna-bot.venv\Lib\site-packages\nonebot_plugin_shindan_init_.py", line 171, in handler
res = await make_shindan(shindan.id, name, shindan.mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\setuna-bot.venv\Lib\site-packages\nonebot_plugin_shindan\shindanmaker.py", line 82, in make_shindan
html, has_chart = await render_html(content)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\setuna-bot.venv\Lib\site-packages\nonebot_plugin_shindan\shindanmaker.py", line 112, in render_html
assert isinstance(result, Tag)
^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
查阅issue#19后参照db6a6af7cd8a59b701e23f6a439a62dd5ce29d5b修改了
async def get(client: httpx.AsyncClient, url: str, **kwargs):
return await request(client, "GET", url, **kwargs)
函数
为
async def post(client: httpx.AsyncClient, url: str, **kwargs):
resp = await client.post(
url, headers=headers, timeout=20, follow_redirects=True, **kwargs
)
resp.raise_for_status()
return resp
后其中一个报错消失,剩下报错
File "E:\setuna-bot.venv\Lib\site-packages\nonebot_plugin_shindan_init_.py", line 171, in handler
res = await make_shindan(shindan.id, name, shindan.mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\setuna-bot.venv\Lib\site-packages\nonebot_plugin_shindan\shindanmaker.py", line 112, in render_html
assert isinstance(result, Tag)
^^^^^^^^^^^^^^^^^^^^^^^
The text was updated successfully, but these errors were encountered: