subzeroid / instagrapi

🔥 The fastest and powerful Python library for Instagram Private API 2024
https://hikerapi.com/p/bkXQlaVe
MIT License
4.38k stars 685 forks source link

[BUG] instagrapi.exceptions.PhotoNotUpload: {"debug_info":{"retriable":false,"type":"ProcessingFailedError","message":"Request processing failed"}} #1309

Closed cuchorapido closed 1 year ago

cuchorapido commented 1 year ago

Describe the bug I am using this script to try to post a picture on instagram it worked on the past, the picture is 1024x1024 and 3.0MB

from instagrapi import Client
import sys
import os

def post_image(image_path, username, password, caption):
    cl = Client(request_timeout=7)
    cl.login(username, password)
    cl.photo_upload(image_path, caption)

if __name__ == "__main__":
    image_path = sys.argv[1]
    username = sys.argv[2]
    password = sys.argv[3]
    caption = sys.argv[4]

To Reproduce python3 post-ig.py posted/1.png "myusername" "mypassword" "good bye". (while waiting to run i am checking in the instagram app to allow new devices to log in and manually approve)

**Traceback**
Status 429: Too many requests
Ignore 429: Continue login   
Photo Upload failed with the following response: <Response [400]>
Traceback (most recent call last):
  File "/home/ubuntu/twitch-content/1805097782/audios/text-parts/post-ig.py", line 16, in <module>
    post_image(image_path, username, password, caption)
  File "/home/ubuntu/twitch-content/1805097782/audios/text-parts/post-ig.py", line 8, in post_image
    cl.photo_upload(image_path, caption)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/instagrapi/mixins/photo.py", line 228, in photo_upload
    upload_id, width, height = self.photo_rupload(path, upload_id)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/instagrapi/mixins/photo.py", line 190, in photo_rupload
    raise PhotoNotUpload(response.text, response=response, **last_json)
instagrapi.exceptions.PhotoNotUpload: {"debug_info":{"retriable":false,"type":"ProcessingFailedError","message":"Request processing failed"}}

Expected behavior upload a picture on instagram

Screenshots image

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

cuchorapido commented 1 year ago

any ideas?

adw0rd commented 1 year ago

@cuchorapido yes, use the search on Issue and Discussions

adw0rd commented 1 year ago

https://github.com/adw0rd/instagrapi/issues?q=PhotoNotUpload

https://github.com/adw0rd/instagrapi/discussions?discussions_q=PhotoNotUpload