Closed lee-android closed 6 years ago
Clone the repo https://github.com/timgrossmann/InstaPy and copy the instapy folder inside this repo.
Thank you, that seems to have done it. However, now I'm getting this error:
python3 telegram-instapy.py Traceback (most recent call last): File "telegram-instapy.py", line 244, in main() File "telegram-instapy.py", line 217, in main updater = Updater(telegram_token) File "/usr/local/lib/python3.6/site-packages/telegram/ext/updater.py", line 122, in init self.bot = Bot(token, base_url, request=self._request) File "/usr/local/lib/python3.6/site-packages/telegram/bot.py", line 108, in init self.token = self._validate_token(token) File "/usr/local/lib/python3.6/site-packages/telegram/bot.py", line 134, in _validate_token raise InvalidToken() telegram.error.InvalidToken: Invalid token
I have already followed the provided steps to create a bot, and I also copied the necessary information in the config.ini file as well.
This error is reported by telegram-api when the token still not valid. Try to print the readed token from config.ini at first line of main() method.
def main():
print (telegram_token)
updater = Updater(telegram_token)
Compare printing with your token get from BotFather.
Traceback (most recent call last):
File "telegram-instapy.py", line 292, in <module>
main()
File "telegram-instapy.py", line 265, in main
updater = Updater(telegram_token)
File "/Library/Python/2.7/site-packages/telegram/ext/updater.py", line 122, in __init__
self.bot = Bot(token, base_url, request=self._request)
File "/Library/Python/2.7/site-packages/telegram/bot.py", line 108, in __init__
self.token = self._validate_token(token)
File "/Library/Python/2.7/site-packages/telegram/bot.py", line 134, in _validate_token
raise InvalidToken()
I'm getting the same error using the right token printed in the main and in the
/Library/Python/2.7/site-packages/telegram/bot.py
This is an example. This working. Try to set manually token in variable without using ConfigParser.
This works! Nice
I have an similar error... can you help me?
Traceback (most recent call last):
File "C:\Ariel\2018\InstaPy-master\telegram-instapy.py", line 232, in
error:
Traceback (most recent call last): File "telegram-instapy.py", line 9, in
from instapy import instapy
ImportError: cannot import name 'instapy'
if you could help me with this, I'd appreciate it greatly.