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]Error is >> Upload has failed due to incomplete chunk uploads. #78

Open MohammadrezaTazian opened 4 years ago

MohammadrezaTazian commented 4 years ago

My code is like follow:

from instapy_cli import client

username = "*****"
password = "*****"
video = 'document_2019-11-12_13-39-13.mp4'
text = 'This is a test' 
cookie_file = 'COOKIE_FOR_USER.json'  # default: `USERNAME_ig.json`

with client(username, password, cookie_file=cookie_file, write_cookie_file=True) as cli:
    cli.upload(video, text)

But after runing get this error:

[IG] re-use cookie from COOKIE_FOR_USER.json ClientConnectionError posting chunks: URLError ClientConnectionError posting chunks: URLError ClientConnectionError posting chunks: URLError ClientConnectionError posting chunks: URLError ClientConnectionError posting chunks: URLError ClientConnectionError posting chunks: URLError ClientConnectionError posting chunks: URLError ClientConnectionError posting chunks: URLError ClientConnectionError posting chunks: URLError ClientConnectionError posting chunks: URLError ClientConnectionError posting chunks: URLError Error is >> Upload has failed due to incomplete chunk uploads. Traceback (most recent call last):

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

File "D:/python/TelegramLogin/uploadvideotoinsta.py", line 16, in cli.upload(video, text) File "C:\Users\re**\Desktop\Python36\lib\site-packages\instapy_cli\cli.py", line 153, in upload raise IOError("Unable to upload.") OSError: Unable to upload.

Process finished with exit code 1

Why isn't it work me?

Python3.6