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
If API request with a file (i.e. sending a message with a file) fails and d.py needs to try the request, it errors out
Reproduction Steps
Reliable repro is a bit hard to make as this only happens if d.py needs to retry the API request.
The code with which this can happen can be something like this:
File "python3.8/site-packages/discord/abc.py", line 915, in send
data = await state.http.send_files(channel.id, files=[file], allowed_mentions=allowed_mentions,
File "python3.8/site-packages/discord/http.py", line 185, in request
async with self.__session.request(method, url, **kwargs) as r:
File "python3.8/site-packages/aiohttp/client.py", line 1117, in __aenter__
self._resp = await self._coro
File "python3.8/site-packages/aiohttp/client.py", line 492, in _request
req = self._request_class(
File "python3.8/site-packages/aiohttp/client_reqrep.py", line 313, in __init__
self.update_body_from_data(data)
File "python3.8/site-packages/aiohttp/client_reqrep.py", line 507, in update_body_from_data
body = body()
File "python3.8/site-packages/aiohttp/formdata.py", line 168, in __call__
return self._gen_form_data()
File "python3.8/site-packages/aiohttp/formdata.py", line 132, in _gen_form_data
raise RuntimeError("Form data has been processed already")
RuntimeError: Form data has been processed already
Intents
discord.Intents.all()
System Information
Python v3.8.8-final
discord.py v1.6.0-final
aiohttp v3.7.3
system info: Windows 10 10.0.19041
Checklist
I have searched the open issues for duplicates.
I have shown the entire traceback, if possible.
I have removed my token from display, if visible.
This happens on aiohttp 3.7 as the FormData object has been changed so that it only can be used once.
Summary
If API request with a file (i.e. sending a message with a file) fails and d.py needs to try the request, it errors out
Reproduction Steps
Reliable repro is a bit hard to make as this only happens if d.py needs to retry the API request.
The code with which this can happen can be something like this:
Expected Results
No error
Actual Results
Traceback:
Intents
discord.Intents.all()
System Information
Checklist
This happens on aiohttp 3.7 as the
FormData
object has been changed so that it only can be used once.Related commit and issues:
aio-libs/aiohttp@d931f10
aio-libs/aiohttp#4351
aio-libs/aiohttp#4345
I know you're already aware of this issue but I figured it might be worth making a tracking issue for this so that it doesn't get lost.
The text was updated successfully, but these errors were encountered: