D
D
darkmol2021-07-08 22:47:52
Python
darkmol, 2021-07-08 22:47:52

How to fix startup error?

When starting a telegram bot, the following error occurs: __init__() got an unexpected keyword argument 'threaded'
Value: bot = telebot.TeleBot("name", threaded=True, num_threads=300)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vindicar, 2021-07-09
@Vindicar

Well, even the auto-translator will decipher the error: the class constructor does not know the threaded argument that you pass.
That's why he is unknown - already more interesting. This argument has been there for 6 years already
. I don’t see any typos like Russian / Latin "e" ...
Just in case, specify the version of the telebot package that you have. Their latest release is 3.8.1.

A
Alan Gibizov, 2021-07-18
@phaggi

There is a feeling that somewhere in the project there is a module, class or function with a name that repeats and, accordingly, obscures some name from the libraries. Therefore, there is no such argument. Without the code, one can only guess.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question