S
S
Samosh20102021-09-05 14:58:12
Python
Samosh2010, 2021-09-05 14:58:12

Why doesn't the telebot module have a types class?

I'm writing a telegram bot and I'm trying to import the types class from the telebot module, but it throws an error:

Traceback (most recent call last):
  File "C:\Users\maksa\Desktop\My Files\bad bot\main.py", line 2, in <module>
    from telebot import types
ImportError: cannot import name 'types' from 'telebot' (C:\Program Files\Python39\lib\site-packages\telebot\__init__.py)

What to do in such a situation? even installed pytelegrambotapi, but it does not help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
o5a, 2021-09-05
@Samosh2010

pip uninstall telebot
pip uninstall PyTelegramBotAPI
pip install PyTelegramBotAPI

and you don’t have to try to install the telebot library anymore, the correct PyTelegramBotAPI

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question