1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Help me] Python code error

Discussion in 'Hire a Freelancer' started by InternetKid, Apr 20, 2017.

  1. InternetKid

    InternetKid Newbie

    Joined:
    Apr 14, 2017
    Messages:
    42
    Likes Received:
    2
    Gender:
    Male
    Occupation:
    Supreme Cop BOT
    I got an Python Instagram Bot Code but when Itry to run the Code there always Comes this error message:

    <<
    ModuleNotFoundError: No module named 'requests_toolbelt'
    >>

    So it could not Import "request_toolbelt" but i don't know how to install modules.
    The Internet says " - pip install (modulname)" but where should I run this command?
    I tried all Options. I already installed "requests" but what is "request_toolbelt" I couldn't find out something. Could somemone please help me.
     
  2. bartosimpsonio

    bartosimpsonio Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 21, 2013
    Messages:
    12,071
    Likes Received:
    10,840
    Occupation:
    WHEREZ MA
    Location:
    BITCOINS AT?
    Home Page:
    You should run pip in your terminal or shell. Search google for basic instructions on how to install python modules for your OS.
     
  3. InternetKid

    InternetKid Newbie

    Joined:
    Apr 14, 2017
    Messages:
    42
    Likes Received:
    2
    Gender:
    Male
    Occupation:
    Supreme Cop BOT
    I already run the command in cmd or Shell but nothing happens.
     
  4. SpoonFeeder

    SpoonFeeder Regular Member

    Joined:
    Mar 19, 2017
    Messages:
    411
    Likes Received:
    273
    Gender:
    Male
    Occupation:
    SpoonFeeding & Babysitting the Noobs
    Install python and pip

    Code:
    https://github.com/BurntSushi/nfldb/wiki/Python-&-pip-Windows-installation
    After installing pip run pip install requests-toolbelt in the cmd/shell.

    Run the bot again.
     
  5. bartosimpsonio

    bartosimpsonio Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 21, 2013
    Messages:
    12,071
    Likes Received:
    10,840
    Occupation:
    WHEREZ MA
    Location:
    BITCOINS AT?
    Home Page:
  6. InternetKid

    InternetKid Newbie

    Joined:
    Apr 14, 2017
    Messages:
    42
    Likes Received:
    2
    Gender:
    Male
    Occupation:
    Supreme Cop BOT
    Yeah got the module installe dbut now there are other error Messages:

    <<
    Traceback (most recent call last):
    File "S:\Python\lib\site-packages\imageio\plugins\ffmpeg.py", line 82, in get_exe
    auto=False)
    File "S:\Python\lib\site-packages\imageio\core\fetching.py", line 102, in get_remote_file
    raise NeedDownloadError()
    imageio.core.fetching.NeedDownloadError
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
    File "H:\Instagram Bot\Instagram-API-python-master\InstagramAPI.py", line 25, in <module>
    from moviepy.editor import VideoFileClip
    File "S:\Python\lib\site-packages\moviepy\editor.py", line 22, in <module>
    from .video.io.VideoFileClip import VideoFileClip
    File "S:\Python\lib\site-packages\moviepy\video\io\VideoFileClip.py", line 3, in <module>
    from moviepy.video.VideoClip import VideoClip
    File "S:\Python\lib\site-packages\moviepy\video\VideoClip.py", line 20, in <module>
    from .io.ffmpeg_writer import ffmpeg_write_image, ffmpeg_write_video
    File "S:\Python\lib\site-packages\moviepy\video\io\ffmpeg_writer.py", line 15, in <module>
    from moviepy.config import get_setting
    File "S:\Python\lib\site-packages\moviepy\config.py", line 38, in <module>
    FFMPEG_BINARY = get_exe()
    File "S:\Python\lib\site-packages\imageio\plugins\ffmpeg.py", line 86, in get_exe
    raise NeedDownloadError('Need ffmpeg exe. '
    imageio.core.fetching.NeedDownloadError: Need ffmpeg exe. You can download it by calling:
    imageio.plugins.ffmpeg.download()

    >>
     
  7. bartosimpsonio

    bartosimpsonio Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 21, 2013
    Messages:
    12,071
    Likes Received:
    10,840
    Occupation:
    WHEREZ MA
    Location:
    BITCOINS AT?
    Home Page:
    raise NeedDownloadError('Need ffmpeg exe. '
    imageio.core.fetching.NeedDownloadError: Need ffmpeg exe. You can download it by calling:
    imageio.plugins.ffmpeg.download()

    You need to install ffmpeg.exe
     
  8. InternetKid

    InternetKid Newbie

    Joined:
    Apr 14, 2017
    Messages:
    42
    Likes Received:
    2
    Gender:
    Male
    Occupation:
    Supreme Cop BOT
    Done but the new Error message is:

    Traceback (most recent call last):
    File "H:\Instagram Bot\Instagram-API-python-master\test.py", line 10, in <module>
    InstagramAPI.tagFeed("cat") # get media list by tag #cat
    File "H:\Instagram Bot\Instagram-API-python-master\InstagramAPI.py", line 466, in tagFeed
    userFeed = self.SendRequest('feed/tag/'+ str(tag) +'/?rank_token=' + str(self.rank_token) + '&ranked_content=true&')
    AttributeError: 'InstagramAPI' object has no attribute 'rank_token'
     
  9. Javardo69

    Javardo69 Junior Member

    Joined:
    Jul 19, 2014
    Messages:
    102
    Likes Received:
    6
    you need a token from the instagram api, have you already applied to the instagram api?
     
  10. TimelordHarry

    TimelordHarry Regular Member

    Joined:
    Apr 6, 2017
    Messages:
    234
    Likes Received:
    56
    Gender:
    Male
    Occupation:
    Tardis Enginner
    Location:
    Gallifrey
    If you don't know how to run and program python bot, it probably is not a good idea to use the one that uses instagram API.
     
  11. bartosimpsonio

    bartosimpsonio Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 21, 2013
    Messages:
    12,071
    Likes Received:
    10,840
    Occupation:
    WHEREZ MA
    Location:
    BITCOINS AT?
    Home Page:
    The error messages are always very clear. What does that one say? Hint Javardo69 gave you the answer....

    This bot depends on a IG API token.