S
S
SwatXX2021-09-02 21:34:59
Python
SwatXX, 2021-09-02 21:34:59

I get an error on startup, what is it?

here is the code

import telebot
from keyboard import main_keyboard, back_keyboard_check, keyboard_qiwi, checks_and_balances_keyboard, back, tinkoff, screens, sber, admin, rassilka_keyboard, mail
from telebot import InlineKeyboardMarkup
import sqlite3
from PIL import Image, ImageFont, ImageDraw
import json
import random
import os
import time
from telebot import types

when compiling it gives the following error:
from telebot import InlineKeyboardMarkup
ImportError: cannot import name 'InlineKeyboardMarkup' from 'telebot' (C:\Users\1\Desktop\bot python\lib\site-packages\telebot\__init__.py)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vindicar, 2021-09-02
@SwatXX

How did you install the telebot package? pip install telebot?
If so, congratulations, you installed the wrong package. The correct package is called pyTelegramBotAPI, although after installation it is also connected as import telebot.
Well, a mandatory note: do not start learning python with bots. You'll hit a lot of bumps.

M
mkone112, 2021-09-02
@mkone112

Hello, I find it difficult to identify the error, an error that I don’t understand flies out at startup, what is it?

As an expert, I can say that the whole point is that:
ImportError: cannot import name 'InlineKeyboardMarkup' from 'telebot'

glad to help, please!
Well, spaces and Cyrillic in the paths ... fuuu ...

A
alternativshik, 2021-09-03
@alternativshik

from telebot.types import InlineKeyboardMarkup

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question