When I did the bot, I decided to check it out, and now, in the Python script, I launch the script - it works, but in pycharm - no, an error occurs

AttributeError: 'TeleBot' object has no attribute 'message_handler'

What is the problem? Telebot - there is, and in picharm, in general, here's the code:

 import telebot token = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" bot = telebot.TeleBot(token) @bot.message_handler(commands=["start"]) def start(message): bot.reply_to(message.chat.id, "Welcome, NyaMiner! I'm happy to see you:) When you start me, I send you a command. Ok, so, Dear Miner, I give you list with commands: /start - command for run me, /help - take you a list with commands, /startmine - start mining process, /stopmining - stop the process, /sendnya - send count of nyaCoin to user which you enter") bot.polling() 
  • You do not accidentally lured telebot and pytelegrambotapi? - andreymal

0