[Help me] Python code error

Status
Not open for further replies.

InternetKid

Newbie
Joined
Apr 14, 2017
Messages
42
Reaction score
2
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.
 
You should run pip in your terminal or shell. Search google for basic instructions on how to install python modules for your OS.
 
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.
 
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()

>>
 
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
 
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
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'
 
you need a token from the instagram api, have you already applied to the instagram api?
 
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.
 
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'

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.
 
Status
Not open for further replies.
This thread has been auto closed due to the forum's thread age policy. Read more.
Back
Top