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
As I found no actual way to fix this issue - the aiohttp multiwriter is just crap for this kind of stuff - I decided to keep this function syncronous and so also blocking.
Reading the files in a non-blocking way is also way complex to implement, so the function would be blocking anyways.
I'll see if I'm able to find a solution in the future, but for now I'm gonna push a fix commit for this issue that basically makes the function blocking (you still need to await it tho).
document = await app.upload_media(f"./sample.pdf")
ERROR: Only io.IOBase, multidict and (name, file) pairs allowed, use .add_field() for passing more complex parameters, got <MultipartEncoder: {'file': ('./sample.pdf', <_io.BufferedReader name='/sample.pdf'>, 'application/pdf'), 'messaging_product': 'whatsapp', 'type': 'application/pdf'}>
The text was updated successfully, but these errors were encountered: