Open LAMike310 opened 5 years ago
please, add relevant informations such as python and instapy-cli version
Also, I suggest you to update to latest release of instapy-cli 0.0.10
and re-try.
Hello. I've got the same sort of error on .mp4 file in ubuntu. Pictures are send successfully without errors.
instapy-cli 0.0.10 | python 3.5.2 Reusing settings: User_ig.json
Traceback (most recent call last):
File "/usr/local/bin/instapy", line 10, in
Hi, I dont know if this issues is resolved or not. I just got the same issues
python ver : 3.6.8 | instapy-cli 0.0.12
Traceback (most recent call last):
File "c:\users\oce\anaconda3\envs\insta\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\oce\anaconda3\envs\insta\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\oce\Anaconda3\envs\insta\Scripts\instapy.exe__main__.py", line 9, in
Help would greatly appreciated
Thanks
This is duo to the missing sanity check for the filetype. Somehow the lib filetype is having problems with some mp4 and can't guess the right type.
Can you provide a mp4 video example that filetype failed to identify?
@b3nab i have the solution, the issue's origin is actually the filetype library and specifically this line at media.py
self.media_ext = filetype.guess(self.media_path).extension
filetype is returning None on some videos so to fix it you can use Magic instead of filetype
PyPi: https://pypi.org/project/python-magic-bin/0.4.14/ or Pip: pip install python-magic-bin
so now in the media.py
first : import magic
then change the check_type function to this:
`def check_type(self):
self.media_ext = magic.from_file(self.media_path,mime=True)
self.media_ext= self.media_ext.split('/')[1]`
Thanks it worked really fine.
@b3nab Please review the changes if possible. This is an issue which is also happening in my use case of this library.
Hey guys I have been having the same issue my code was:
from
instapy_cli import client
username = 'testing211714' password = '****' image = 'posts/keenan.png' text = 'This will be the caption of your photo.' + '\r\n' + 'You can also use hashtags! #hash #tag #now'
with client(username, password) as cli: cli.upload(image, text)`
But recieved the error: (env) Ryans-MacBook-Pro:InstaAutomaterFirstTry ryankeenan$ python app.py [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 "app.py", line 9, in
I followed @salahar9 advice and imported magic at media.py but the error just changed to: (env) Ryans-MacBook-Pro:InstaAutomaterFirstTry ryankeenan$ python app.py [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 "app.py", line 10, in
I cloned the repo and tried to run the example "upload-a-video.py":
But I got an error in the console that said:
Any idea what I'm doing wrong?