eternnoir / pyTelegramBotAPI

Python Telegram bot api.
GNU General Public License v2.0
8.12k stars 2.03k forks source link

AttributeError: 'module' object has no attribute 'Telebot' #229

Closed parrotchute closed 8 years ago

parrotchute commented 8 years ago

I'm using the latest version of pyTelegramBotAPI installed via pip on pythonanywhere, python version 3.4.3, but I'm getting this error on their Bash console.

AttributeError: 'module' object has no attribute 'Telebot'

I'm using the echo bot example and I don't see where I've made a mistake. Is this an incompatibility issue with pythonanywhere?

(telegramvenv) 06:09 ~ $ pip install pyTelegramBotAPI
Collecting pyTelegramBotAPI
  Downloading pyTelegramBotAPI-2.1.7.tar.gz
Collecting requests (from pyTelegramBotAPI)
  Downloading requests-2.11.1-py2.py3-none-any.whl (514kB)
    100% |████████████████████████████████| 522kB 864kB/s 
Collecting six (from pyTelegramBotAPI)
Building wheels for collected packages: pyTelegramBotAPI
  Running setup.py bdist_wheel for pyTelegramBotAPI ... done
  Stored in directory: /home/kudan/.cache/pip/wheels/34/69/1b/04f3ef48e7d7e8772d0e267f11f33fd993c6d8521c6fe36b8f
Successfully built pyTelegramBotAPI
Installing collected packages: requests, six, pyTelegramBotAPI
Successfully installed pyTelegramBotAPI-2.1.7 requests-2.11.1 six-1.10.0
(telegramvenv) 06:09 ~ $ python echo_bot.py
Traceback (most recent call last):
  File "echo_bot.py", line 5, in <module>
    bot = telebot.Telebot(key)
AttributeError: 'module' object has no attribute 'Telebot'

I even tried from telebot import Telebot but all I got was this error:

Traceback (most recent call last):
  File "echo_bot.py", line 1, in <module>
    from telebot import Telebot
ImportError: cannot import name 'Telebot'
ghost commented 8 years ago

there's not "Telebot", there's "TeleBot" E.g : >>>> from telebot import TeleBot

parrotchute commented 8 years ago

Doh, how did I miss that? So sorry and thanks for the clearing that up!

HamidulloRahmonberdiyev commented 1 year ago

Hi. I've get error " ModuleNotFoundError: No module named 'telebot" in consol. Please, Help me.

coder2020official commented 1 year ago

Install it with pip install pytelegrambotapi