Skip to content

图片太大直接报_handle_response错误怎么解决? #231

@DioBakery

Description

@DioBakery

图片太大直接报_handle_response错误怎么解决?

[ERROR] (http.py:76)_handle_response    [botpy] 接口请求异常,请求连接: https://api.sgroup.qq.com/v2/groups/204FC4AD44DCCF5F09EFFF46C852F8A0/files, 错误代码: 413, 返回内容: <html>
<head><title>413 Request Entity Too Large</title></head>
<body>
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>stgw</center>
</body>
</html>
, trace_id:None
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/botpy/client.py", line 285, in _run_event
    await coro(*args, **kwargs)
  File "/root/qqBot/test.py", line 27, in on_group_at_message_create
    uploadMedia = await message._api.post_group_base64file(
  File "/usr/local/lib/python3.10/dist-packages/botpy/api.py", line 1510, in post_group_base64file
    return await self._http.request(route, json=payload)
  File "/usr/local/lib/python3.10/dist-packages/botpy/http.py", line 190, in request
    return await _handle_response(response)
  File "/usr/local/lib/python3.10/dist-packages/botpy/http.py", line 85, in _handle_response
    raise ServerError(message) from None  # adding from None to prevent chain exception being raised
botpy.errors.ServerError: <html>
<head><title>413 Request Entity Too Large</title></head>
<body>
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>stgw</center>
</body>
</html>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions