b3nab / instapy-cli

:sparkles: Python library and CLI to upload photo and video on Instagram. W/o a phone!
MIT License
601 stars 98 forks source link

[BUG] Upload not working #79

Open vascostmr opened 5 years ago

vascostmr commented 5 years ago

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.

bilyboy785 commented 5 years ago

Same error with instapy-cli 0.0.12 | python 3.7.3

JannisHajda commented 5 years ago

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

torres-xyz commented 5 years ago

Same here in instapy-cli 0.0.12 and Python 3.7

siskot commented 5 years ago

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.

RayChao2016 commented 5 years ago

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

QihangFan commented 5 years ago

Same error with instapy-cli 0.0.12 and Python 3.8.0

RashminDungrani commented 5 years ago

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.

anmolagarwal552 commented 5 years ago

something wrong with this , same error

roycebank commented 5 years ago

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

RayChao2016 commented 4 years ago

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

Lucasmiguelmac commented 4 years ago

Anyone worked this out? Using selenium in the meantime

didduinc commented 4 years ago

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.

samelakshay commented 4 years ago

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

FourKube commented 4 years ago

@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

RashminDungrani commented 4 years ago

@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 !!!

viatekh commented 4 years ago

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 commented 4 years ago

example is also broken!

roycebank commented 4 years ago

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/

popama commented 4 years ago

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.

pauapaua commented 4 years ago

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`
roycebank commented 4 years ago

@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}")

vascYT commented 4 years ago

I also need help...

NaNonnI commented 4 years ago

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.

vascYT commented 4 years ago

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

naveenbharadwaj19 commented 4 years ago

So no solution for this ? any other api ?

vascYT commented 4 years ago

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

divyanshu-parihar commented 3 years ago

Same error with instapy-cli 0.0.12 | python 3.7.3

same with me

MirabbosMirzakhmedov commented 3 years ago

It's 2021, any solutions so far?

roycebank commented 3 years ago

It's 2021, any solutions so far?

...

JannisHajda commented 3 years ago

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

nextalgon commented 3 years ago

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