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] IOError : [Errno 2] No such file or directory #68

Closed gkimpson closed 5 years ago

gkimpson commented 5 years ago

Describe the bug Have installed the instapy-cli package and just run a simple command as follows : instapy -u iliketotest123 -p password -f www.nba.com -t 'TEST MSG'

I get the IOError IOError: [Errno 2] No such file or directory: 'www.nba.com'

To Reproduce Code to reproduce the behavior: Install the instapy-cli as per the instructions and run the following from the commandline instapy -u iliketotest123 -p password -f www.nba.com -t 'TEST MSG'

(note I have changed the password above)

Expected behavior It to post the following message with the link 'nba.com' to instagram for the user iliketotest123

Logs If there are any errors or exceptions, add the logs to help explain your problem.

instapy-cli 0.0.12  |  python 2.7.10
[IG] not found cookie/cookie_file >> login as default
Traceback (most recent call last):
  File "/Users/gavin/Library/Python/2.7/bin/instapy", line 10, in <module>
    sys.exit(main())
  File "/Users/gavin/Library/Python/2.7/lib/python/site-packages/instapy_cli/__main__.py", line 44, in main
    cli.upload(options.file, text, story)
  File "/Users/gavin/Library/Python/2.7/lib/python/site-packages/instapy_cli/cli.py", line 116, in upload
    media = Media(file)
  File "/Users/gavin/Library/Python/2.7/lib/python/site-packages/instapy_cli/media.py", line 29, in __init__
    self.check_type()
  File "/Users/gavin/Library/Python/2.7/lib/python/site-packages/instapy_cli/media.py", line 32, in check_type
    self.media_ext = filetype.guess(self.media_path).extension
  File "/Users/gavin/Library/Python/2.7/lib/python/site-packages/filetype/filetype.py", line 28, in guess
    return match(obj) if obj else None
  File "/Users/gavin/Library/Python/2.7/lib/python/site-packages/filetype/match.py", line 28, in match
    buf = get_bytes(obj)
  File "/Users/gavin/Library/Python/2.7/lib/python/site-packages/filetype/utils.py", line 64, in get_bytes
    return get_signature_bytes(obj)
  File "/Users/gavin/Library/Python/2.7/lib/python/site-packages/filetype/utils.py", line 17, in get_signature_bytes
    with open(path, 'rb') as fp:

Env (please complete the following information):

gkimpson commented 5 years ago

not an issue - need to pass a full URL