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

aiocqhttp.exceptions.ApiNotAvailable #18

Closed
satouriko opened this issue Apr 10, 2019 · 1 comment
Closed

aiocqhttp.exceptions.ApiNotAvailable #18

satouriko opened this issue Apr 10, 2019 · 1 comment

Comments

@satouriko
Copy link

同样的代码发送文本(小的消息)没事,发送图片(base64编码,较大)抛出 ApiNotAvailable 异常,怀疑跟 Websocket Fragmentation 有关 kyubotics/coolq-http-api#85

ujson module not found, using json
msgpack not installed, MsgPackSerializer unavailable
Task exception was never retrieved
future: <Task finished coro=<main_loop() done, defined at /nijigasaki-bot/nijigasaki/app/twitter.py:28> exception=ApiNotAvailable()>
Traceback (most recent call last):
  File "/nijigasaki-bot/nijigasaki/app/twitter.py", line 32, in main_loop
    await do_feed()
  File "/nijigasaki-bot/nijigasaki/app/twitter.py", line 59, in do_feed
    f"{tweet['id_str']}_{idx}")
  File "/nijigasaki-bot/nijigasaki/app/twitter.py", line 94, in fetch_and_push_img
    'twitter', f"[CQ:image,file=base64://{base64.b64encode(resp).decode('ascii')}]")
  File "/nijigasaki-bot/nijigasaki/model/subject.py", line 115, in push_update
    await get_bot().send_msg(**ctx, message=content)
  File "/usr/local/lib/python3.6/site-packages/aiocqhttp/api.py", line 184, in call_action
    raise ApiNotAvailable
aiocqhttp.exceptions.ApiNotAvailable

message.txt

@stdrc
Copy link
Member

stdrc commented Feb 14, 2020

测试了一下,似乎没毛病,可能当时连接有问题吧

@stdrc stdrc closed this as completed Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants