Привет!
Запустил скрипт через два дня,после того,как сделал(все работало)
Щас такая ошибка
2020-11-11 08:44:11,798 (util.py:66 WorkerThread1) ERROR - TeleBot: "TypeError occurred, args=("'NoneType' object is not callable",)
Traceback (most recent call last):
File "C:\Users\fyodo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\util.py", line 60, in run
task(*args, **kwargs)
TypeError: 'NoneType' object is not callable
"
2020-11-11 08:44:11,798 - TeleBot - ERROR - TypeError occurred, args=("'NoneType' object is not callable",)
Traceback (most recent call last):
File "C:\Users\fyodo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\util.py", line 60, in run
task(*args, **kwargs)
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
File "casino_bot.py", line 480, in <module>
bot.polling(none_stop=True)
File "C:\Users\fyodo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\__init__.py", line 392, in polling
self.__threaded_polling(none_stop, interval, timeout)
File "C:\Users\fyodo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\__init__.py", line 416, in __threaded_polling
self.worker_pool.raise_exceptions()
File "C:\Users\fyodo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\util.py", line 109, in raise_exceptions
six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
File "C:\Users\fyodo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\six.py", line 703, in reraise
raise value
File "C:\Users\fyodo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\util.py", line 60, in run
task(*args, **kwargs)
TypeError: 'NoneType' object is not callable
Скорее всего ошибка тут
def coll(message):
try:
coll = message.text
c = int(coll)
con = sqlite3.connect("dannie_2.db")
cur = con.cursor()
cur.execute(f"SELECT id, name, balance FROM users")
users = cur.fetchall()
b = 1
while b <= c:
con = sqlite3.connect("dannie_2.db")
cur = con.cursor()
cur.execute(f"SELECT id, name, balance FROM users")
users = cur.fetchall()
a = str(users[-b])
message(message.chat.id,text=a)
b = b+1
bot.send_message(message.chat.id, "Введите id человека, которому Вы хотите изменить баланс",
reply_markup=nazad_admin())
bot.register_next_step_handler(message, chan_balance)
except ValueError:
bot.send_message(chat_id=message.chat.id,text="Не число")