instapy-cli icon indicating copy to clipboard operation
instapy-cli copied to clipboard

[BUG] OSError: Unable to Upload

Open dylan736 opened this issue 5 years ago • 53 comments

I cannot upload to Instagram with InstaPy-CLI using unchanged python scripts which used to work just 2 days ago.

I have two files (master.py and exec.py). I run exec.py to carry out the functions in master.py.

Master.py:

import urllib.request
from PIL import Image, ImageOps
from instapy_cli import client
from datetime import date

def get_item_shop():
    url = "http://api2.nitestats.com/v1/shop/image?footer=USE%20CODE:%20%22DISTURBED%22"
    urllib.request.urlretrieve(url, "itemshop.jpg")

def resize():
    desired_size = 1728
    im_pth = "itemshop.jpg"

    im = Image.open(im_pth)
    old_size = im.size  # old_size[0] is in (width, height) format

    ratio = float(desired_size)/max(old_size)
    new_size = tuple([int(x*ratio) for x in old_size])
    # use thumbnail() or resize() method to resize the input image

    # thumbnail is a in-place operation

    # im.thumbnail(new_size, Image.ANTIALIAS)

    im = im.resize(new_size, Image.ANTIALIAS)
    # create a new image and paste the resized on it

    new_im = Image.new("RGB", (desired_size, desired_size), (30,30,30))
    new_im.paste(im, ((desired_size-new_size[0])//2,
                        (desired_size-new_size[1])//2))

    output_path = 'itemshop2.jpg'
    new_im.save(output_path)





def post():
    today = date.today()
    d2 = today.strftime("%B %d, %Y")

    heart = "\U00002764"

    username = 'fbr.itemshop'
    password = 'Albion0411'
    cookie_file = 'cookie.json'

    image = 'itemshop2.jpg'
    text = 'Daily item shop for ' + d2 +'.' + '\r\n' + '\r\n' + 'Rate this item shop from 1-10!' + '\r\n' + '\r\n' + 'Use code: "Disturbed" to support me! ' + heart + '\r\n' + '#fortnite #itemshop #dailyitemshop #fortniteitemshop'


    with client(username, password, cookie_file=cookie_file, write_cookie_file=True) as cli:

        cookies = cli.get_cookie()

        cli.upload(image, text)

Exec.py:

import master
import time

master.get_item_shop()
print("Item shop saved.")
time.sleep(5)
master.resize()
print("Image resized.")
time.sleep(5)
master.post()
print("Image posted.")

These scripts fetch the Fortnite Item Shop image from nitestats.com API, resizes it to 1:1 for IG, and uploads it. Saving the image and resizing still works, but posting to IG doesn't. As the item shop refreshes every day at 00:00 for me, I use crontab on my RPi to schedule the running of these python scripts. It has worked in the past, so I know crontab has no errors. However, I set crontab to write to a log so that I could see if anything went wrong. Below is what I got.

Logs

This is what is outputted to a log when the scripts are functioning:

Item shop saved.
Image resized.
[IG] not found cookie/cookie_file >> login as default
SAVED: COOKIE_FOR_USER.json
Done.
Image posted.

And, when they're not working:

Item shop saved.
Image resized.
[IG] re-use cookie from COOKIE_FOR_USER.json
Error is >>
    Bad Request

Something went bad.
Please retry or send an issue on https://github.com/b3nab/instapy-cli

Traceback (most recent call last):
  File "/home/pi/Downloads/ItemShopBot/exec.py", line 10, in <module>
    master.post()
  File "/home/pi/Downloads/ItemShopBot/master.py", line 57, in post
    cli.upload(image, text)
  File "/home/pi/.local/lib/python3.8/site-packages/instapy_cli/cli.py", line 153, in upload
    raise IOError("Unable to upload.")
OSError: Unable to upload.

Env (please complete the following information):

  • OS: Raspbian and Windows 10
  • Python: 3.8
  • instapy-cli Version: 0.0.12

I have searched Google for this issue, and the only thing I could find was saying that Instagram have declined my request to upload. I have attempted to run the code on Windows, which gave the same issue, with and without a VPN, with different Instagram accounts, reset the passwords, and tried to use the scripts with and without the cookie file. I am fairly new to Python and would appreciate any help possible.

dylan736 avatar Oct 31 '19 00:10 dylan736

Go into instapy_cli/media.py and make sure that def check_type(self) is this:

    def check_type(self):
        ext = filetype.guess(self.media_path)
        if None is self.media_ext:
            absolute_path = os.path.abspath(self.media_path)
            self.media_ext = os.path.splitext(absolute_path)[-1].replace(".", "")
        else:
            self.media_ext = ext.extension

Karltroid avatar Oct 31 '19 05:10 Karltroid

I'm facing the same issue as well. I've wrote a very simple code to upload an image called 't.png' that's in the same directory as my source code.

Source Code:

from instapy_cli import client

username = '' #Username Goes Here
password = '' #Password Goes Here

content = './t.png'
with client (username, password) as cli:
    cli.upload(content)

Error Obtained:

[IG] not found cookie/cookie_file >> login as default
Error parsing error response: Expecting value: line 1 column 1 (char 0)
Error is >>
    Bad Request

Something went bad.
Please retry or send an issue on https://github.com/b3nab/instapy-cli

Traceback (most recent call last):
  File "pg.py", line 8, in <module>
    cli.upload(content)
  File "C:\Users\RJ\Desktop\NewTest\lib\site-packages\instapy_cli\cli.py", line 153, in upload
    raise IOError("Unable to upload.")
OSError: Unable to upload.

Environment:

  • Python version 3.7.3
  • Instapy-CLI version 0.0.12
  • Windows 10 machine

I'd also like to note that I've done the modifications to media.py as @Karltroid recommended and I'm still facing the same issue. I've also tried to modify media.py as per #46 and that still didn't help.

ghost avatar Oct 31 '19 06:10 ghost

facing the same issue, tried the same as @THConer :( any help appreciated!

FruechteBini avatar Oct 31 '19 15:10 FruechteBini

I got the same error with python 3.6.9 (virtualenv) on a Linux machine.

ruggfrancesco avatar Oct 31 '19 16:10 ruggfrancesco

@Karltroid your fix did not work. Still getting the same error. :(

dylan736 avatar Oct 31 '19 17:10 dylan736

Same here.... Not working anymore...

HoshenKadosh avatar Oct 31 '19 20:10 HoshenKadosh

ig changed the api

RK-GEEKSDOBYTE avatar Oct 31 '19 22:10 RK-GEEKSDOBYTE

Update: It seems to me that as of now (November 2nd 2019 7:00am GMT) uploading works perfectly fine for myself.

ghost avatar Nov 02 '19 07:11 ghost

I solved the problem by uninstalling and then installing: (Ubuntu 18.04.3 with Python3)

pip uninstall instapy-cli pip install instapy-cli

(for python3 replace pip to pip3)

rgomunita avatar Nov 03 '19 22:11 rgomunita

It had been working fine for me until today. Then I got the dreaded "Bad Request" message. Will try to reinstall.

islandwonderer avatar Nov 19 '19 08:11 islandwonderer

@islandwonderer i tried reinstalling...its not working ...any other solution....?

jafarzzz avatar Nov 19 '19 13:11 jafarzzz

suddenly gived error before today bot was running anyway. i know alles ok for upload, probably instagram did something. whatever happened it happened today

roycebank avatar Nov 19 '19 15:11 roycebank

same issue on my side. Reinstall did not help

pydemo avatar Nov 20 '19 05:11 pydemo

will you upload just photos? you should look, maybe helpful https://paste.ubuntu.com/p/mxyYmBpryK/

roycebank avatar Nov 20 '19 10:11 roycebank

Same problem here since the 17/11/2019, probably Instagram made changes in the API.

esTse avatar Nov 20 '19 23:11 esTse

will you upload just photos? you should look, maybe helpful https://paste.ubuntu.com/p/mxyYmBpryK/

this is fantastic! thank you

pydemo avatar Nov 21 '19 17:11 pydemo

Has anyone been able to work this out?

Lucasmiguelmac avatar Dec 02 '19 22:12 Lucasmiguelmac

Has anyone been able to work this out?

gave up on it and wrote new script using gist posted by @roycebank https://paste.ubuntu.com/p/mxyYmBpryK/

pydemo avatar Dec 05 '19 15:12 pydemo

Has anyone been able to work this out?

gave up on it and wrote new script using gist posted by @roycebank https://paste.ubuntu.com/p/mxyYmBpryK/

I'm new to this... could you be so kind as to explain how to use this code?

i needed to create a post so that was easy change - your hack depends on ur needs

pydemo avatar Dec 05 '19 16:12 pydemo

@roycebank not able to upload videos with your code

jafarzzz avatar Dec 11 '19 04:12 jafarzzz

@roycebank not able to upload videos with your code

i was say "will you upload just photos" but if instagram give access to upload video format you can upload with my code.

roycebank avatar Dec 11 '19 18:12 roycebank

@roycebank not able to upload videos with your code

his script is only a guideline. you have to hack it to make it work for you

pydemo avatar Dec 11 '19 19:12 pydemo

@pydemo guide me to hack it then

jafarzzz avatar Dec 11 '19 20:12 jafarzzz

@pydemo guide me to hack it then

@roycebank's solution will require chromedriver and portable chrome or carary browser. This hack also depends on the platform - where do u run it on Windows, Linux or MacOS?

pydemo avatar Dec 18 '19 17:12 pydemo

@pydemo kindly help with the lines needed to hack. what is expected here: driverpth = ""

OlaSeye avatar Dec 19 '19 20:12 OlaSeye

@pydemo kindly help with the lines needed to hack. what is expected here: driverpth = ""

it's a path to chromedriver (which you have to download for your platform/Chrome/Canary browser version)

pydemo avatar Dec 19 '19 20:12 pydemo

Thanks @pydemo

I am getting the below after "pip install autoit". what am i missing.

File "c:/Users/user/Desktop/py codes/new_insta.py", line 4, in import autoit ModuleNotFoundError: No module named 'autoit'

OlaSeye avatar Dec 19 '19 20:12 OlaSeye

Thanks @pydemo

I am getting the below after "pip install autoit". what am i missing.

File "c:/Users/user/Desktop/py codes/new_insta.py", line 4, in import autoit ModuleNotFoundError: No module named 'autoit'

autoit will work only on Windows OS

pydemo avatar Dec 19 '19 20:12 pydemo

I am using windows OS 7

OlaSeye avatar Dec 19 '19 20:12 OlaSeye

Already installed successfully as below:

PS C:\Users\user> pip install autoit Requirement already satisfied: autoit in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (0.1)

OlaSeye avatar Dec 19 '19 20:12 OlaSeye

Already installed successfully as below:

PS C:\Users\user> pip install autoit Requirement already satisfied: autoit in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (0.1)

simple googling will give u solution: "python -m pip install pyautoit"

pydemo avatar Dec 19 '19 20:12 pydemo

Thanks @pydemo . I have been able to get it to login. However its not posting the picture nor the text. I observe there are two pops after it logged in. example is the one below. How to handle it.

image

OlaSeye avatar Dec 20 '19 16:12 OlaSeye

Hello All, I need your help to hack the code posted by @roycebank . Can login but no post. What am I to hack.

OlaSeye avatar Dec 23 '19 20:12 OlaSeye

try to change driver.find_element_by_xpath value in whiles/loops.

roycebank avatar Dec 25 '19 08:12 roycebank

Does anyone have a solution to this yet?

mcpeixoto avatar Dec 26 '19 14:12 mcpeixoto

guys i've tried a different method its working for upload videos but i couldnt upgrade method codes bcause i dont have time. you must connect your ig account with any facebook account then fill mail,passwd with fb account info. https://paste.ubuntu.com/p/gfnjZ397k7/

roycebank avatar Jan 16 '20 16:01 roycebank

I will give it a try

OlaSeye avatar Jan 17 '20 10:01 OlaSeye

I'm facing the same issue as well. I've wrote a very simple code to upload an image called 't.png' that's in the same directory as my source code.

Source Code:

from instapy_cli import client

username = '' #Username Goes Here
password = '' #Password Goes Here

content = './t.png'
with client (username, password) as cli:
    cli.upload(content)

Error Obtained:

[IG] not found cookie/cookie_file >> login as default
Error parsing error response: Expecting value: line 1 column 1 (char 0)
Error is >>
    Bad Request

Something went bad.
Please retry or send an issue on https://github.com/b3nab/instapy-cli

Traceback (most recent call last):
  File "pg.py", line 8, in <module>
    cli.upload(content)
  File "C:\Users\RJ\Desktop\NewTest\lib\site-packages\instapy_cli\cli.py", line 153, in upload
    raise IOError("Unable to upload.")
OSError: Unable to upload.

Environment:

* Python version 3.7.3

* Instapy-CLI version 0.0.12

* Windows 10 machine

I'd also like to note that I've done the modifications to media.py as @Karltroid recommended and I'm still facing the same issue. I've also tried to modify media.py as per #46 and that still didn't help.

facing the same problem and not find any helpful result about this one

dikshu-py avatar Jan 23 '20 17:01 dikshu-py

same reaction here facing same..Here

dikshu-py avatar Jan 23 '20 17:01 dikshu-py

As requested here's image upload workaround using @roycebank code: https://github.com/pydemo/final_upload

pydemo avatar Jan 27 '20 17:01 pydemo

Not working @pydemo

OlaSeye avatar Jan 31 '20 08:01 OlaSeye

Not working @pydemo

leave error details on a project page

pydemo avatar Jan 31 '20 13:01 pydemo

having the same error, tried to reinstall instapy-cli, no joy :(

Error is >> Bad Request

Something went bad. Please retry or send an issue on https://github.com/b3nab/instapy-cli File "C:\Users\Antec\AppData\Roaming\Python\Python37\site-packages\instapy_cli\cli.py", line 153, in upload raise IOError("Unable to upload.") OSError: Unable to upload.

any steps to fix it? many thanks in advance!!

ram-sh avatar Feb 02 '20 01:02 ram-sh

Not working @pydemo

updated, try now

pydemo avatar Feb 03 '20 15:02 pydemo

Has anyone been able to work this out?

gave up on it and wrote new script using gist posted by @roycebank https://paste.ubuntu.com/p/mxyYmBpryK/

autoit.control_send("Open", "Edit1", photopath)
time.sleep(1.5)
autoit.control_send("Open", "Edit1", "{ENTER}")

The second control_send doesn't upload the picture for me. It just reopens the "Open" file window, a new one.

The strange thing is the same code is working on a different machine. Not sure why it doesn't work on the current machine. Any help appreciated.

jasonyunjoonpark avatar Mar 16 '20 19:03 jasonyunjoonpark

fyi, "autoit" Python module will work only on Windows OS

On Mon, Mar 16, 2020 at 3:09 PM Jason Park [email protected] wrote:

Has anyone been able to work this out?

gave up on it and wrote new script using gist posted by @roycebank https://github.com/roycebank https://paste.ubuntu.com/p/mxyYmBpryK/

autoit.control_send("Open", "Edit1", photopath) time.sleep(1.5) autoit.control_send("Open", "Edit1", "{ENTER}")

The second control_send doesn't upload the picture for me. It just reopens the "Open" file window, a new one.

The strange thing is the same code is working on a different machine. Not sure why it doesn't work on the current machine. Any help appreciated.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/instagrambot/instapy-cli/issues/75#issuecomment-599712061, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIYJ32PCQE3LYZ4SU3LXJ5LRHZ2M7ANCNFSM4JHCLD4Q .

-- Alex Buzunov 1 (212) 518-3000

pydemo avatar Mar 16 '20 19:03 pydemo

fyi, "autoit" Python module will work only on Windows OS On Mon, Mar 16, 2020 at 3:09 PM Jason Park @.***> wrote: Has anyone been able to work this out? gave up on it and wrote new script using gist posted by @roycebank https://github.com/roycebank https://paste.ubuntu.com/p/mxyYmBpryK/ autoit.control_send("Open", "Edit1", photopath) time.sleep(1.5) autoit.control_send("Open", "Edit1", "{ENTER}") The second control_send doesn't upload the picture for me. It just reopens the "Open" file window, a new one. The strange thing is the same code is working on a different machine. Not sure why it doesn't work on the current machine. Any help appreciated. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#75 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIYJ32PCQE3LYZ4SU3LXJ5LRHZ2M7ANCNFSM4JHCLD4Q . -- Alex Buzunov 1 (212) 518-3000

Yes i understand that. The issue is that the code is opening 2 "Open windows" for some reason. It was working on another windows machine fine. The same code is not working on a different windows machine.

jasonyunjoonpark avatar Mar 16 '20 19:03 jasonyunjoonpark

which code?

On Mon, Mar 16, 2020 at 3:18 PM Jason Park [email protected] wrote:

fyi, "autoit" Python module will work only on Windows OS … <#m_-5745052845703630099_> On Mon, Mar 16, 2020 at 3:09 PM Jason Park @.***> wrote: Has anyone been able to work this out? gave up on it and wrote new script using gist posted by @roycebank https://github.com/roycebank https://github.com/roycebank https://paste.ubuntu.com/p/mxyYmBpryK/ autoit.control_send("Open", "Edit1", photopath) time.sleep(1.5) autoit.control_send("Open", "Edit1", "{ENTER}") The second control_send doesn't upload the picture for me. It just reopens the "Open" file window, a new one. The strange thing is the same code is working on a different machine. Not sure why it doesn't work on the current machine. Any help appreciated. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#75 (comment) https://github.com/instagrambot/instapy-cli/issues/75#issuecomment-599712061>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIYJ32PCQE3LYZ4SU3LXJ5LRHZ2M7ANCNFSM4JHCLD4Q . -- Alex Buzunov 1 (212) 518-3000

Yes i understand that. The issue is that the code is opening 2 "Open windows" for some reason. It was working on another windows machine fine. The same code is not working on a different windows machine.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/instagrambot/instapy-cli/issues/75#issuecomment-599715787, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIYJ32MSU3KY6B6RVZNV2XDRHZ3PTANCNFSM4JHCLD4Q .

-- Alex Buzunov 1 (212) 518-3000

pydemo avatar Mar 16 '20 19:03 pydemo

which code? On Mon, Mar 16, 2020 at 3:18 PM Jason Park @.> wrote: fyi, "autoit" Python module will work only on Windows OS … <#m_-5745052845703630099_> On Mon, Mar 16, 2020 at 3:09 PM Jason Park @.> wrote: Has anyone been able to work this out? gave up on it and wrote new script using gist posted by @roycebank https://github.com/roycebank https://github.com/roycebank https://paste.ubuntu.com/p/mxyYmBpryK/ autoit.control_send("Open", "Edit1", photopath) time.sleep(1.5) autoit.control_send("Open", "Edit1", "{ENTER}") The second control_send doesn't upload the picture for me. It just reopens the "Open" file window, a new one. The strange thing is the same code is working on a different machine. Not sure why it doesn't work on the current machine. Any help appreciated. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#75 (comment) <#75 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIYJ32PCQE3LYZ4SU3LXJ5LRHZ2M7ANCNFSM4JHCLD4Q . -- Alex Buzunov 1 (212) 518-3000 Yes i understand that. The issue is that the code is opening 2 "Open windows" for some reason. It was working on another windows machine fine. The same code is not working on a different windows machine. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#75 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIYJ32MSU3KY6B6RVZNV2XDRHZ3PTANCNFSM4JHCLD4Q . -- Alex Buzunov 1 (212) 518-3000

https://paste.ubuntu.com/p/mxyYmBpryK/

autoit.control_send("Open", "Edit1", photopath)
time.sleep(1.5)
autoit.control_send("Open", "Edit1", "{ENTER}")

The above code does not work. When it does control_send, it just opens the window again. I did a work around fix for it by literally duplicating the lines:

autoit.control_send("Open", "Edit1", photopath)
time.sleep(1.5)
autoit.control_send("Open", "Edit1", "{ENTER}")

time.sleep(1.5)
autoit.control_send("Open", "Edit1", photopath)
time.sleep(1.5)
autoit.control_send("Open", "Edit1", "{ENTER}")

jasonyunjoonpark avatar Mar 16 '20 19:03 jasonyunjoonpark

it didn't work for me either. i had to hack it: https://github.com/pydemo/final_upload

On Mon, Mar 16, 2020 at 3:22 PM Jason Park [email protected] wrote:

which code? … <#m_4743969176246689758_> On Mon, Mar 16, 2020 at 3:18 PM Jason Park @.> wrote: fyi, "autoit" Python module will work only on Windows OS … <#m_-5745052845703630099_> On Mon, Mar 16, 2020 at 3:09 PM Jason Park @.> wrote: Has anyone been able to work this out? gave up on it and wrote new script using gist posted by @roycebank https://github.com/roycebank https://github.com/roycebank https://github.com/roycebank https://paste.ubuntu.com/p/mxyYmBpryK/ autoit.control_send("Open", "Edit1", photopath) time.sleep(1.5) autoit.control_send("Open", "Edit1", "{ENTER}") The second control_send doesn't upload the picture for me. It just reopens the "Open" file window, a new one. The strange thing is the same code is working on a different machine. Not sure why it doesn't work on the current machine. Any help appreciated. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#75 https://github.com/instagrambot/instapy-cli/issues/75 (comment) <#75 (comment) https://github.com/instagrambot/instapy-cli/issues/75#issuecomment-599712061>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIYJ32PCQE3LYZ4SU3LXJ5LRHZ2M7ANCNFSM4JHCLD4Q . -- Alex Buzunov 1 (212) 518-3000 Yes i understand that. The issue is that the code is opening 2 "Open windows" for some reason. It was working on another windows machine fine. The same code is not working on a different windows machine. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#75 (comment) https://github.com/instagrambot/instapy-cli/issues/75#issuecomment-599715787>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIYJ32MSU3KY6B6RVZNV2XDRHZ3PTANCNFSM4JHCLD4Q . -- Alex Buzunov 1 (212) 518-3000

https://paste.ubuntu.com/p/mxyYmBpryK/

autoit.control_send("Open", "Edit1", photopath)

time.sleep(1.5)

autoit.control_send("Open", "Edit1", "{ENTER}")

The above code does not work. When it does control_send, it just opens the window again. I did a work around fix for it by literally duplicating the lines:

autoit.control_send("Open", "Edit1", photopath)

time.sleep(1.5)

autoit.control_send("Open", "Edit1", "{ENTER}")

time.sleep(1.5)

autoit.control_send("Open", "Edit1", photopath)

time.sleep(1.5)

autoit.control_send("Open", "Edit1", "{ENTER}")

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/instagrambot/instapy-cli/issues/75#issuecomment-599717644, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIYJ32NE6LLUXGEQLF4G2BLRHZ4A3ANCNFSM4JHCLD4Q .

-- Alex Buzunov 1 (212) 518-3000

pydemo avatar Mar 16 '20 19:03 pydemo

what? nobody has solved this issue in 2021? xD

RomjanHossain avatar Feb 13 '21 12:02 RomjanHossain

@RomjanHossain You can try if you want. :D The project is deprecated, lots of spammers on instagram and no one supported me (collaborations, PRs or donations). So I'm not supporting the project anymore. 🥂

b3nab avatar Feb 16 '21 09:02 b3nab

@b3nab - I previously used this library for a project posting aerial photography to Instagram. Thank you for building it!

johnjreiser avatar Feb 16 '21 15:02 johnjreiser

Hello there, I have actually debugged this issue .. turns out that Instagram has disabled their public API as of June 2020. Once if you check the code where the request is sent to the endpoint we actually get a 404 Not Found which is turning out to print the error "Unable to Upload Error" Your best option is to use Selenium or other resources for this automation

jx13xx avatar May 13 '21 20:05 jx13xx