G
G
galaxy31412021-08-22 14:01:22
Python
galaxy3141, 2021-08-22 14:01:22

Hello, when starting the bot there is an error?

C:\Users\Administrator\Desktop\11>main.py
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\11\main.py", line 3, in
from telebot import types
File " C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\telebot\types.py", line 12, in
from telebot import util
File "C:\Users\Administrator\AppData\Local \Programs\Python\Python39\lib\site-packages\telebot\util.py", line 307, in
def user_link(user: types.User, include_id: bool=False) -> str:
AttributeError: partially initialized module 'telebot .types' has no attribute 'User' (most likely due to a circular import)

C:\Users\Administrator\Desktop\11>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
soremix, 2021-08-22
@galaxy3141

pip uninstall telebot
pip install pytelegrambotapi

telebot - another library

G
Groosha, 2021-08-22
@Groosha

Is there a telebot.py file in the directory with the bot? If yes, then it should be renamed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question