Skip to content
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

Error 403 while uploading photo #745

Open
samuelbraun04 opened this issue Jun 23, 2022 Discussed in #744 · 1 comment
Open

Error 403 while uploading photo #745

samuelbraun04 opened this issue Jun 23, 2022 Discussed in #744 · 1 comment

Comments

@samuelbraun04
Copy link

samuelbraun04 commented Jun 23, 2022

Discussed in #744

Originally posted by diegogurr June 23, 2022
After 1 week of posting photos (every 4 hours,using crontab) without problems now it says 'Photo Upload failed with the following response : <Response [403]>
My code for publishing:

def publishPost(path,description):
    try:
        cl.photo_upload(path,description)
    except LoginRequired:
        cl.relogin()
        cl.dump_settings(s_path)

What could be the problem? How can I solve this?


I'm getting the same error out of no where. My full traceback:

Traceback (most recent call last):
  File "/home/samuelbraun04/.local/lib/python3.9/site-packages/instagrapi/mixins/private.py", line 298, in _send_private_request
    response.raise_for_status()
  File "/usr/lib/python3/dist-packages/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://i.instagram.com/api/v1/media/configure_sidecar/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/samuelbraun04/instagramBot/sidecars.py", line 228, in sidecar
    bot.album_upload(files, str(open(CAPTIONS_PATH+CONJOINER+caption, "r", encoding='utf-8').read()))
  File "/home/samuelbraun04/.local/lib/python3.9/site-packages/instagrapi/mixins/album.py", line 217, in album_upload
    raise e
  File "/home/samuelbraun04/.local/lib/python3.9/site-packages/instagrapi/mixins/album.py", line 206, in album_upload
    configured = (configure_handler or self.album_configure)(
  File "/home/samuelbraun04/.local/lib/python3.9/site-packages/instagrapi/mixins/album.py", line 285, in album_configure
    return self.private_request(
  File "/home/samuelbraun04/.local/lib/python3.9/site-packages/instagrapi/mixins/private.py", line 445, in private_request
    raise e
  File "/home/samuelbraun04/.local/lib/python3.9/site-packages/instagrapi/mixins/private.py", line 432, in private_request
    self._send_private_request(endpoint, **kwargs)
  File "/home/samuelbraun04/.local/lib/python3.9/site-packages/instagrapi/mixins/private.py", line 323, in _send_private_request
    raise LoginRequired(response=e.response, **last_json)
instagrapi.exceptions.LoginRequired: login_required

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/samuelbraun04/instagramBot/sidecars.py", line 230, in sidecar
    bot.photo_upload(files[0], str(open(CAPTIONS_PATH+CONJOINER+caption, "r", encoding='utf-8').read()))
  File "/home/samuelbraun04/.local/lib/python3.9/site-packages/instagrapi/mixins/photo.py", line 230, in photo_upload
    upload_id, width, height = self.photo_rupload(path, upload_id)
  File "/home/samuelbraun04/.local/lib/python3.9/site-packages/instagrapi/mixins/photo.py", line 192, in photo_rupload
    raise PhotoNotUpload(response.text, response=response, **last_json)
instagrapi.exceptions.PhotoNotUpload: login_required
@ghost
Copy link

ghost commented Jul 27, 2022

Discussed in #744

Originally posted by diegogurr June 23, 2022 After 1 week of posting photos (every 4 hours,using crontab) without problems now it says 'Photo Upload failed with the following response : <Response [403]> My code for publishing:

def publishPost(path,description):
    try:
        cl.photo_upload(path,description)
    except LoginRequired:
        cl.relogin()
        cl.dump_settings(s_path)

What could be the problem? How can I solve this?

I'm getting the same error out of no where. My full traceback:

Traceback (most recent call last):
  File "/home/samuelbraun04/.local/lib/python3.9/site-packages/instagrapi/mixins/private.py", line 298, in _send_private_request
    response.raise_for_status()
  File "/usr/lib/python3/dist-packages/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://i.instagram.com/api/v1/media/configure_sidecar/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/samuelbraun04/instagramBot/sidecars.py", line 228, in sidecar
    bot.album_upload(files, str(open(CAPTIONS_PATH+CONJOINER+caption, "r", encoding='utf-8').read()))
  File "/home/samuelbraun04/.local/lib/python3.9/site-packages/instagrapi/mixins/album.py", line 217, in album_upload
    raise e
  File "/home/samuelbraun04/.local/lib/python3.9/site-packages/instagrapi/mixins/album.py", line 206, in album_upload
    configured = (configure_handler or self.album_configure)(
  File "/home/samuelbraun04/.local/lib/python3.9/site-packages/instagrapi/mixins/album.py", line 285, in album_configure
    return self.private_request(
  File "/home/samuelbraun04/.local/lib/python3.9/site-packages/instagrapi/mixins/private.py", line 445, in private_request
    raise e
  File "/home/samuelbraun04/.local/lib/python3.9/site-packages/instagrapi/mixins/private.py", line 432, in private_request
    self._send_private_request(endpoint, **kwargs)
  File "/home/samuelbraun04/.local/lib/python3.9/site-packages/instagrapi/mixins/private.py", line 323, in _send_private_request
    raise LoginRequired(response=e.response, **last_json)
instagrapi.exceptions.LoginRequired: login_required

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/samuelbraun04/instagramBot/sidecars.py", line 230, in sidecar
    bot.photo_upload(files[0], str(open(CAPTIONS_PATH+CONJOINER+caption, "r", encoding='utf-8').read()))
  File "/home/samuelbraun04/.local/lib/python3.9/site-packages/instagrapi/mixins/photo.py", line 230, in photo_upload
    upload_id, width, height = self.photo_rupload(path, upload_id)
  File "/home/samuelbraun04/.local/lib/python3.9/site-packages/instagrapi/mixins/photo.py", line 192, in photo_rupload
    raise PhotoNotUpload(response.text, response=response, **last_json)
instagrapi.exceptions.PhotoNotUpload: login_required

Did your account get temporarily or permanently terminated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant