pyTelegramBotAPI icon indicating copy to clipboard operation
pyTelegramBotAPI copied to clipboard

AttributeError: module 'telebot' has no attribute 'types'

Open axtrace opened this issue 8 years ago • 3 comments

import telebot
tb = telebot.TeleBot(token)
remove_markup = telebot.types.ReplyKeyboardRemove(True)

Get:

Traceback (most recent call last): remove_markup = telebot.types.ReplyKeyboardRemove(True) AttributeError: module 'telebot' has no attribute 'types'

Tried to uninstall telebot and install pyTelegramBotAPI (as it was in 323). It did not help. What should I do to start correctly?

pyTelegramBotAPI 3.5.1 Ubuntu 16.04 Python 3.5.2

axtrace avatar Jan 20 '18 18:01 axtrace

try to create virtualenv and import again

heyyyoyy avatar Jan 21 '18 21:01 heyyyoyy

Hm. I'd uninstalled both telebot and pyTelegramBotApi and installed telebot first and pyTelegramBotApi then. And it works well now

sudo -H pip3 uninstall pytelegrambotapi

sudo -H pip3 uninstall telebot

sudo -H pip3 install telebot

sudo -H pip3 install pytelegrambotapi

axtrace avatar Jan 25 '18 20:01 axtrace

oh Mata Hari It's repeated on my Win 10 computer

axtrace avatar Aug 08 '19 22:08 axtrace