We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Code:
async def post_video_to_twitter(caption, video_path): media_id = await client.upload_media(source=video_path, wait_for_completion=True, media_type="video/mp4", media_category="tweet_video") tweet = await client.create_tweet( text=caption, media_ids=[media_id] )
Error:
in post_video_to_twitter media_id = await client.upload_media(source=video_path, wait_for_completion=True, media_type="video/mp4", media_category="tweet_video") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.venv/lib/python3.12/site-packages/twikit/client/client.py", line 995, in upload_media await append_gather File "/root/.venv/lib/python3.12/site-packages/twikit/client/v11.py", line 145, in upload_media_append return await self.upload_media( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.venv/lib/python3.12/site-packages/twikit/client/v11.py", line 112, in upload_media return await self.base.request(method, endpoint, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.venv/lib/python3.12/site-packages/twikit/client/client.py", line 156, in request raise BadRequest(message, headers=response.headers) twikit.errors.BadRequest: status: 400, message: "{"request":"\/i\/media\/upload.json","error":"media parameter is missing."}" INFO:httpx:HTTP Request: POST https://upload.twitter.com/i/media/upload.json?command=APPEND&media_id=1861878596425424896&segment_index=0 "HTTP/1.1 400 Bad Request"
"request":"/i/media/upload.json","error":"media parameter is missing."
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Code:
Error:
"request":"/i/media/upload.json","error":"media parameter is missing."
The text was updated successfully, but these errors were encountered: