How to remove error telegram. bot "Expecting value: line 1 column 1 (char 0)"?

Good afternoon.

Before the bot functioned in good faith. Now from time to time when sending a command, it hangs for 1-2 minutes and, instead of the correct result of the execution returns the result + text "Expecting value: line 1 column 1 (char 0)"
Moreover, this error is of a floating character

import telebot

token = 'my token'
botan_token = 'token nerd'


def log(message):
 print("\n ---------")
 from datetime import datetime
 print(" Message from {0} to {1}. (id = {2}) \n Text - {3}".format(message.from_user.first_name,

def handle_start(message):
 user_markup = telebot.types.ReplyKeyboardMarkup(True, False)
 user_markup.row('Change', 'Adjustment')
 user_markup.row('Closure', 'Return')
 user_markup.row('Hide', 'Help')
 bot.send_message(, 'Welcome to..', reply_markup=user_markup)

def handle_text(message):
 if message.text == "Change":
 user_markup = telebot.types.ReplyKeyboardMarkup()
 user_markup.row('case 1')
 user_markup.row('In case 2')
 user_markup.row('main menu')
 bot.send_message(, 'Select item', reply_markup=user_markup)
 botan.track(botan_key,, message, 'Change')

<code in the same spirit>


bot.polling(none_stop=True, interval=0)

Itself error from the console:

June 10th 19 at 16:07
1 answer
June 10th 19 at 16:09
Error returns the api Yandex metrics ( when the metric is not working.

Find more questions by tags TelegramPython