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

[BUG] Upload not working

Open vascostmr opened this issue 5 years ago • 32 comments

Hi everyone, the upload method in cli.py is not working.

$instapy -u ***** -p "*****" -f ig.png -t 'post_text'

instapy-cli 0.0.12  |  python 3.6.8
[IG] not found cookie/cookie_file >> login as default
Error parsing error response: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "/home/vascostmr/ffmpeg_scripts/blog/my_py3/bin/instapy", line 8, in <module>
    sys.exit(main())
  File "/home/vascostmr/ffmpeg_scripts/blog/my_py3/lib/python3.6/site-packages/instapy_cli/__main__.py", line 44, in main
    cli.upload(options.file, text, story)
  File "/home/vascostmr/ffmpeg_scripts/blog/my_py3/lib/python3.6/site-packages/instapy_cli/cli.py", line 166, in upload
    raise IOError("Unable to upload.")
OSError: Unable to upload.

The error is thrown in upload.py from the instagram_private_api module, with a "Bad Request" message.

vascostmr avatar Nov 20 '19 16:11 vascostmr

Same error with instapy-cli 0.0.12 | python 3.7.3

bilyboy785 avatar Nov 20 '19 17:11 bilyboy785

I got the same error. Hopefully it will be fixed as soon as possible.

JannisHajda avatar Nov 20 '19 17:11 JannisHajda

Same here in instapy-cli 0.0.12 and Python 3.7

torres-xyz avatar Nov 21 '19 13:11 torres-xyz

I have got almost the same error: instapy -u s....t -p ****** -f /home/siskot/pic/image-sample-upload.jpg -t 'test picture #first #auto #upload'

instapy-cli 0.0.12 | python 3.6.8 [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 "/usr/local/bin/instapy", line 11, in load_entry_point('instapy-cli', 'console_scripts', 'instapy')() File "/home/siskot/bin/instapy-cli-master/instapy_cli/main.py", line 44, in main cli.upload(options.file, text, story) File "/home/siskot/bin/instapy-cli-master/instapy_cli/cli.py", line 153, in upload raise IOError("Unable to upload.") OSError: Unable to upload.

siskot avatar Nov 21 '19 20:11 siskot

Same here in instapy-cli 0.0.12 and Python 3.7.3 Thanks!

RayChao2016 avatar Nov 22 '19 03:11 RayChao2016

Same error with instapy-cli 0.0.12 and Python 3.8.0

QihangFan avatar Nov 22 '19 18:11 QihangFan

Same error

No handlers could be found for logger "instagram_private_api.errors" Error is >> Bad Request

Traceback (most recent call last): upload()

cli.upload(image, final_caption) raise IOError("Unable to upload.") IOError: Unable to upload.

RashminDungrani avatar Nov 23 '19 03:11 RashminDungrani

something wrong with this , same error

anmolagarwal552 avatar Nov 23 '19 13:11 anmolagarwal552

if you upload just photos ↓ https://paste.ubuntu.com/p/mxyYmBpryK/

roycebank avatar Nov 23 '19 14:11 roycebank

thanks @roycebank , this works for me. looks the temporary solution is to use Selenium...

RayChao2016 avatar Nov 28 '19 05:11 RayChao2016

Anyone worked this out? Using selenium in the meantime

Lucasmiguelmac avatar Dec 02 '19 23:12 Lucasmiguelmac

Anyone worked this out? Using selenium in the meantime

Ya, just change the chrome driver path after installing latest version according to 32 or 64 bit.

didduinc avatar Dec 04 '19 18:12 didduinc

In my code, I login successfully but this code cli.upload(image, text) doesn't work... Same issue... Who has a solution for this?

samelakshay avatar Dec 08 '19 05:12 samelakshay

@didduinc @Lucasmiguelmac @RayChao2016 @roycebank thanks for the selenium suggestion for the mean time. I have successfully been able to log-in with it, however am having trouble uploading photos. I have tried the code at https://paste.ubuntu.com/p/mxyYmBpryK/, but it has not worked for me. I'm on a mac. How are you able to upload? Thanks

FourKube avatar Dec 10 '19 02:12 FourKube

@didduinc @Lucasmiguelmac @RayChao2016 @roycebank thanks for the selenium suggestion for the mean time. I have successfully been able to log-in with it, however am having trouble uploading photos. I have tried the code at https://paste.ubuntu.com/p/mxyYmBpryK/, but it has not worked for me. I'm on a mac. How are you able to upload? Thanks

import autoit there is module called autoit that's only works on windows os.

what is the solution for instapy_cli ? if anyone able to upload post please replay !!!

RashminDungrani avatar Dec 10 '19 11:12 RashminDungrani

am also having this issue -

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 "igpython.py", line 30, in <module>
    cli.upload(path+file, text)
  File "/usr/local/lib/python3.7/site-packages/instapy_cli/cli.py", line 153, in upload
    raise IOError("Unable to upload.")
OSError: Unable to upload.

viatekh avatar Jan 14 '20 12:01 viatekh

example is also broken!

viatekh avatar Jan 14 '20 14:01 viatekh

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

Same issue (Python 2.7.12):

instagram_private_api.errors: Error parsing error response: No JSON object could be decoded Error is >> Bad Request

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

...

ig_res = cli.upload(image, caption) File "/usr/local/lib/python2.7/dist-packages/instapy_cli/cli.py", line 154, in upload raise IOError("Unable to upload.") IOError: Unable to upload.

popama avatar Jan 20 '20 08:01 popama

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/ @vitorgalvao roycebank i think something is wrong with my path. do have any idea?

`

upload("xxx", "xxx", "./chromedriver.exe", "C:\instagram\tom_.2020-01-02_17-31-38.mp4")


File "main.py", line 46, in upload
    autoit.control_send("Aç", "Edit1", os.path.abspath(contentpth))
  File "E:\coden\instagram\uploaderPy\lib\site-packages\autoit\autoit.py", line 84, in wrapper
    raise AutoItError(err_msg)
autoit.autoit.AutoItError: Window/Control could not be found`

pauapaua avatar Jan 20 '20 20:01 pauapaua

@pauapaua if not window name is Aç you must change all autoit Aç values to window name(according to os language)

if your os language is English:

autoit.win_active("Open") time.sleep(2) autoit.control_send("Open", "Edit1", os.path.abspath(contentpth)) time.sleep(1.5) autoit.control_send("Open", "Edit1", "{ENTER}")

roycebank avatar Jan 21 '20 20:01 roycebank

I also need help...

vascYT avatar Apr 15 '20 17:04 vascYT

root@vmi233757:/home/dibot# python upload.py [IG] not found cookie/cookie_file >> login as default No handlers could be found for logger "instagram_private_api.errors" 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 "upload.py", line 7, in cli.upload(image, text) File "/usr/local/lib/python2.7/dist-packages/instapy_cli/cli.py", line 153, in upload raise IOError("Unable to upload.") IOError: Unable to upload.

NaNonnI avatar May 04 '20 18:05 NaNonnI

Guys. Instagram cut the API Support. You can forget this Python Libary.

vascYT avatar May 06 '20 04:05 vascYT

So no solution for this ? any other api ?

naveenbharadwaj19 avatar May 20 '20 11:05 naveenbharadwaj19

I didn't find any solutions. Sorry. But if I do I will let you guys know.

vascYT avatar May 22 '20 03:05 vascYT

Same error with instapy-cli 0.0.12 | python 3.7.3

same with me

divyanshu-parihar avatar Dec 06 '20 13:12 divyanshu-parihar

It's 2021, any solutions so far?

MirabbosMirzakhmedov avatar Nov 14 '21 09:11 MirabbosMirzakhmedov

It's 2021, any solutions so far?

...

roycebank avatar Nov 15 '21 16:11 roycebank

Active development stopped a while a go. Maybe gonna do some updates during the Christmas season, but can't promise.

JannisHajda avatar Nov 15 '21 20:11 JannisHajda

what kind of libraries recomend you for upload post, posts, stories and videos?

nextalgon avatar Nov 17 '21 07:11 nextalgon