eternnoir / pyTelegramBotAPI

Python Telegram bot api.
GNU General Public License v2.0
8.11k stars 2.03k forks source link

Why there is problem? #2253

Closed DarkWebChannel closed 6 months ago

DarkWebChannel commented 6 months ago

I'm use new version of pytgbotapi

Windows

python 3.9.5

2024-05-04 20:12:24,653 (init.py:1147 MainThread) ERROR - TeleBot: "Threaded polling exception: A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: text is too long" 2024-05-04 20:12:24,653 (init.py:1149 MainThread) ERROR - TeleBot: "Exception traceback: Traceback (most recent call last): File "C:\Program Files\Python39\lib\site-packages\telebot__init.py", line 1141, in threaded_polling self.worker_pool.raise_exceptions() File "C:\Program Files\Python39\lib\site-packages\telebot\util.py", line 149, in raise_exceptions raise self.exception_info File "C:\Program Files\Python39\lib\site-packages\telebot\util.py", line 92, in run task(*args, **kwargs) File "C:\Users\New\Desktop\snos\swater\KefSwat.py", line 574, in sm3 send_mail(message, title, text, otpr, to, ms) File "C:\Users\New\Desktop\snos\swater\KefSwat.py", line 643, in send_mail send_log( File "C:\Users\New\Desktop\snos\swater\KefSwat.py", line 702, in send_log bot.send_message(log_chat_id, log_text) File "C:\Program Files\Python39\lib\site-packages\telebot__init__.py", line 1673, in send_message apihelper.send_message( File "C:\Program Files\Python39\lib\site-packages\telebot\apihelper.py", line 264, in send_message return _make_request(token, method_url, params=payload, method='post') File "C:\Program Files\Python39\lib\site-packages\telebot\apihelper.py", line 164, in _make_request json_result = _check_result(method_name, result) File "C:\Program Files\Python39\lib\site-packages\telebot\apihelper.py", line 191, in _check_result raise ApiTelegramException(method_name, result, result_json) telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: text is too long " why there is error? here swater.zip attached code

Badiboy commented 6 months ago

Description: Bad Request: text is too long

Which word is not clear in this error message?