Здравствуйте не давно установил бота на Pythonanywhere, при нажатия на кнопку в боте выходит такая ошибка и бот отключается помогите заранее спасибо.
Код:
2020-06-24 06:07:27,466 (util.py:68 WorkerThread2) ERROR - TeleBot: "JSONDecodeError occurred, args=('Expecting value: line 1 column 1 (char 0)',)
Traceback (most recent call last):
File "/home/hackerru/.local/lib/python3.8/site-packages/telebot/util.py", line 62, in run
task(*args, **kwargs)
File "/home/hackerru/bot/main.py", line 87, in handler_call
check = logic.check_payment(user_id=chat_id)
File "./logic.py", line 39, in check_payment
req = json.loads(h.text)
File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
"
Traceback (most recent call last):
File "/home/hackerru/bot/main.py", line 278, in <module>
start_bot()
File "/home/hackerru/bot/main.py", line 275, in start_bot
bot.polling(none_stop=True)
File "/home/hackerru/.local/lib/python3.8/site-packages/telebot/__init__.py", line 415, in polling
self.__threaded_polling(none_stop, interval, timeout)
File "/home/hackerru/.local/lib/python3.8/site-packages/telebot/__init__.py", line 439, in __threaded_polling
self.worker_pool.raise_exceptions()
File "/home/hackerru/.local/lib/python3.8/site-packages/telebot/util.py", line 111, in raise_exceptions
six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
File "/usr/lib/python3.8/site-packages/six.py", line 696, in reraise
raise value
File "/home/hackerru/.local/lib/python3.8/site-packages/telebot/util.py", line 62, in run
task(*args, **kwargs)
File "/home/hackerru/bot/main.py", line 87, in handler_call
check = logic.check_payment(user_id=chat_id)
File "./logic.py", line 39, in check_payment
req = json.loads(h.text)
File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Последнее редактирование: