-
Notifications
You must be signed in to change notification settings - Fork 167
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
[refactor/tls] TypeError when sending file attachment #763
Comments
I want to add that when using get_user() for the user object rather than fetch_user() then the attachment works. |
The refactor/tls branch is alpha and very unfinished. Regardless, thanks for the bug report because I didn't know about this and it needs to be fixed before the branch is merged into master. |
Hey @hotapmfhypo, does this still occur using the latest version of the refactor/tls branch with the latest version of curl_cffi? |
hey @dolfies this is OP. sorry I got locked out of my other account. im still getting the same error even using the new branch when trying to send files. File "c:\Users\user\Desktop\venvs\venv3.12\Lib\site-packages\discord\client.py", line 596, in _run_event |
Summary
when trying to DM a user with the send() method I get a type error
Reproduction Steps
-using refactor/tls branch
-try to DM .jpg to user with their user ID
Code
Expected Results
send jpg to user
Actual Results
t.py", line 592, in _run_event
t.py", line 592, in _run_event
await coro(*args, **kwargs)
File "c:\Users\Desktop\discord pybot\main.py", line 9, in on_ready
await coro(*args, **kwargs)
File "c:\Users\Desktop\discord pybot\main.py", line 9, in on_ready
File "c:\Users\Desktop\discord pybot\main.py", line 9, in on_ready
await user.send(
File "C:\Users\Desktop\venvs\venv3.12\Lib\site-packages\discord\abc.py", line 1883, in send
data = await state.http.send_message(channel.id, params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Desktop\venvs\venv3.12\Lib\site-packages\discord\http.py", line 808, in request
response = await self.__session.request(method, url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Desktop\venvs\venv3.12\Lib\site-packages\curl_cffi\requests\session.py", line 899, in request
req, buffer, header_buffer, q, header_recved, quit_now = self._set_curl_options(
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Desktop\venvs\venv3.12\Lib\site-packages\curl_cffi\requests\session.py", line 238, in _set_curl_options
raise TypeError("data must be dict, str, BytesIO or bytes")
TypeError: data must be dict, str, BytesIO or bytes
System Information
Checklist
Additional Information
I'm not sure if this error has to do with this module or if its just a problem with how I'm implementing the code in general so sorry in advance if its the latter. I saw someone mention issues with curl_cffi after using the refactor/tls branch so I wanted to ask.
The text was updated successfully, but these errors were encountered: