eternnoir / pyTelegramBotAPI

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

My bot cant start: 2024-02-08 16:52:44,121 (async_telebot.py:455 MainThread) ERROR - TeleBot: "Unhandled exception (full traceback for debug level): 'type'" #2159

Closed Sonys9 closed 9 months ago

Sonys9 commented 9 months ago

image

2024-02-08 16:52:44,121 (async_telebot.py:455 MainThread) ERROR - TeleBot: "Unhandled exception (full traceback for debug level): 'type'" 2024-02-08 16:52:44,180 (async_telebot.py:455 MainThread) ERROR - TeleBot: "Unhandled exception (full traceback for debug level): 'type'" 2024-02-08 16:52:44,232 (async_telebot.py:455 MainThread) ERROR - TeleBot: "Unhandled exception (full traceback for debug level): 'type'" 2024-02-08 16:52:44,307 (async_telebot.py:455 MainThread) ERROR - TeleBot: "Unhandled exception (full traceback for debug level): 'type'" 2024-02-08 16:52:44,363 (async_telebot.py:455 MainThread) ERROR - TeleBot: "Unhandled exception (full traceback for debug level): 'type'" 2024-02-08 16:52:44,423 (async_telebot.py:455 MainThread) ERROR - TeleBot: "Unhandled exception (full traceback for debug level): 'type'" 2024-02-08 16:52:44,475 (async_telebot.py:455 MainThread) ERROR - TeleBot: "Unhandled exception (full traceback for debug level): 'type'" 2024-02-08 16:52:44,530 (async_telebot.py:455 MainThread) ERROR - TeleBot: "Unhandled exception (full traceback for debug level): 'type'"

Sonys9 commented 9 months ago

i tested on host(linux) and on my pc(windows)

Sonys9 commented 9 months ago

new bots works for 2-3 days and stops

Badiboy commented 9 months ago

My bot cant start

or

new bots works for 2-3 days and stops

?

Badiboy commented 9 months ago

pyTelegramBotAPI version?

Sonys9 commented 9 months ago

pyTelegramBotAPI version?

image

Sonys9 commented 9 months ago

Newly created bots work for a couple of days, but for some reason they die

My bot cant start

or

new bots works for 2-3 days and stops

?

i sorry i mean Newly created bots work for a couple of days, but for some reason they die (google-translator)

Sonys9 commented 9 months ago

I've updated the module, but I'm getting another error image : "Unhandled exception (full traceback for debug level): object.init() takes exactly one argument (the instance to initialize)" 2024-02-08 17:29:14,796 (async_telebot.py:455 MainThread) ERROR - TeleBot: "Unhandled exception (full traceback for debug level): object.init() takes exactly one argument (the instance to initialize)" 2024-02-08 17:29:14,841 (async_telebot.py:455 MainThread) ERROR - TeleBot: "Unhandled exception (full traceback for debug level): object.init() takes exactly one argument (the instance to initialize)" 2024-02-08 17:29:14,887 (async_telebot.py:455 MainThread) ERROR - TeleBot: "Unhandled exception (full traceback for debug level): obj

Badiboy commented 9 months ago

Set logger.level = DEBUG and check traceback.

Sonys9 commented 9 months ago

image DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.telegram.org:443 DEBUG:urllib3.connectionpool:https://api.telegram.org:443 "GET /bot6750424697:AAFBJaULW08E7m9T3Lu4AizybWE0d_ZV6Ic/getMe HTTP/1.1" 200 231 DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.telegram.org:443 DEBUG:urllib3.connectionpool:https://api.telegram.org:443 "GET /bot6750424697:AAFBJaULW08E7m9T3Lu4AizybWE0d_ZV6Ic/getUpdates?offset=1&timeout=20 HTTP/1.1" 200 4572 2024-02-08 17:34:31,840 (init.py:1021 MainThread) ERROR - TeleBot: "Infinity polling exception: object.init() takes exactly one argument (the instance to initialize)" ERROR:TeleBot:Infinity polling exception: object.init() takes exactly one argument (the instance to initialize) 2024-02-08 17:34:31,843 (init.py:1023 MainThread) ERROR - TeleBot: "Exception traceback: Traceback (most recent call last): File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 1016, in infinity_polling self.polling(non_stop=True, timeout=timeout, long_polling_timeout=long_polling_timeout, File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 1104, in polling self.threaded_polling(non_stop=non_stop, interval=interval, timeout=timeout, long_polling_timeout=long_polling_timeout,
File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 1179, in threaded_polling raise e File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 1140, in threaded_polling polling_thread.raise_exceptions() File "C:\Program Files\Python310\lib\site-packages\telebot\util.py", line 110, in raise_exceptions raise self.exception_info File "C:\Program Files\Python310\lib\site-packages\telebot\util.py", line 92, in run task(*args, **kwargs) File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 661, in retrieve_updates updates = self.get_updates(offset=(self.last_update_id + 1), File "C:\Program Files\Python310\lib\site-packages\telebot__init__.py", line 636, in get_updates return [types.Update.de_json(ju) for ju in json_updates] File "C:\Program Files\Python310\lib\site-packages\telebot__init__.py", line 636, in return [types.Update.de_json(ju) for ju in json_updates] File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 206, in de_json removed_chat_boost = ChatBoostRemoved.de_json(obj.get('removed_chat_boost')) File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 8993, in de_json obj['source'] = ChatBoostSource.de_json(obj['source']) File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 9025, in de_json return ChatBoostSourcePremium.de_json(obj) File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 9056, in de_json return cls(user) File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 9059, in
init super().init('premium') TypeError: object.init() takes exactly one argument (the instance to initialize) " ERROR:TeleBot:Exception traceback: Traceback (most recent call last): File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 1016, in infinity_polling self.polling(non_stop=True, timeout=timeout, long_polling_timeout=long_polling_timeout, File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 1104, in polling self.threaded_polling(non_stop=non_stop, interval=interval, timeout=timeout, long_polling_timeout=long_polling_timeout,
File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 1179, in threaded_polling raise e File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 1140, in threaded_polling polling_thread.raise_exceptions() File "C:\Program Files\Python310\lib\site-packages\telebot\util.py", line 110, in raise_exceptions raise self.exception_info File "C:\Program Files\Python310\lib\site-packages\telebot\util.py", line 92, in run task(*args, **kwargs) File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 661, in retrieve_updates updates = self.get_updates(offset=(self.last_update_id + 1), File "C:\Program Files\Python310\lib\site-packages\telebot__init__.py", line 636, in get_updates return [types.Update.de_json(ju) for ju in json_updates] File "C:\Program Files\Python310\lib\site-packages\telebot\
init__.py", line 636, in return [types.Update.de_json(ju) for ju in json_updates] File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 206, in de_json removed_chat_boost = ChatBoostRemoved.de_json(obj.get('removed_chat_boost')) File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 8993, in de_json obj['source'] = ChatBoostSource.de_json(obj['source']) File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 9025, in de_json return ChatBoostSourcePremium.de_json(obj) File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 9056, in de_json return cls(user) File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 9059, in
init super().init('premium') TypeError: object.init__() takes exactly one argument (the instance to initialize)

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.telegram.org:443 DEBUG:urllib3.connectionpool:https://api.telegram.org:443 "GET /bot6750424697:AAFBJaULW08E7m9T3Lu4AizybWE0d_ZV6Ic/getUpdates?offset=1&timeout=20 HTTP/1.1" 200 4572 2024-02-08 17:34:35,004 (init.py:1021 MainThread) ERROR - TeleBot: "Infinity polling exception: object.init() takes exactly one argument (the instance to initialize)" ERROR:TeleBot:Infinity polling exception: object.init() takes exactly one argument (the instance to initialize) 2024-02-08 17:34:35,007 (init.py:1023 MainThread) ERROR - TeleBot: "Exception traceback: Traceback (most recent call last): File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 1016, in infinity_polling self.polling(non_stop=True, timeout=timeout, long_polling_timeout=long_polling_timeout, File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 1104, in polling self.threaded_polling(non_stop=non_stop, interval=interval, timeout=timeout, long_polling_timeout=long_polling_timeout,
File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 1179, in threaded_polling raise e File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 1140, in threaded_polling polling_thread.raise_exceptions() File "C:\Program Files\Python310\lib\site-packages\telebot\util.py", line 110, in raise_exceptions raise self.exception_info File "C:\Program Files\Python310\lib\site-packages\telebot\util.py", line 92, in run task(*args, **kwargs) File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 661, in retrieve_updates updates = self.get_updates(offset=(self.last_update_id + 1), File "C:\Program Files\Python310\lib\site-packages\telebot__init__.py", line 636, in get_updates return [types.Update.de_json(ju) for ju in json_updates] File "C:\Program Files\Python310\lib\site-packages\telebot__init__.py", line 636, in return [types.Update.de_json(ju) for ju in json_updates] File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 206, in de_json removed_chat_boost = ChatBoostRemoved.de_json(obj.get('removed_chat_boost')) File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 8993, in de_json obj['source'] = ChatBoostSource.de_json(obj['source']) File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 9025, in de_json return ChatBoostSourcePremium.de_json(obj) File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 9056, in de_json return cls(user) File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 9059, in
init super().init('premium') TypeError: object.init() takes exactly one argument (the instance to initialize) " ERROR:TeleBot:Exception traceback: Traceback (most recent call last): File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 1016, in infinity_polling self.polling(non_stop=True, timeout=timeout, long_polling_timeout=long_polling_timeout, File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 1104, in polling self.threaded_polling(non_stop=non_stop, interval=interval, timeout=timeout, long_polling_timeout=long_polling_timeout,
File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 1179, in threaded_polling raise e File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 1140, in threaded_polling polling_thread.raise_exceptions() File "C:\Program Files\Python310\lib\site-packages\telebot\util.py", line 110, in raise_exceptions raise self.exception_info File "C:\Program Files\Python310\lib\site-packages\telebot\util.py", line 92, in run task(*args, **kwargs) File "C:\Program Files\Python310\lib\site-packages\telebot__init.py", line 661, in retrieve_updates updates = self.get_updates(offset=(self.last_update_id + 1), File "C:\Program Files\Python310\lib\site-packages\telebot__init__.py", line 636, in get_updates return [types.Update.de_json(ju) for ju in json_updates] File "C:\Program Files\Python310\lib\site-packages\telebot\
init__.py", line 636, in return [types.Update.de_json(ju) for ju in json_updates] File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 206, in de_json removed_chat_boost = ChatBoostRemoved.de_json(obj.get('removed_chat_boost')) File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 8993, in de_json obj['source'] = ChatBoostSource.de_json(obj['source']) File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 9025, in de_json return ChatBoostSourcePremium.de_json(obj) File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 9056, in de_json return cls(user) File "C:\Program Files\Python310\lib\site-packages\telebot\types.py", line 9059, in
init super().init('premium') TypeError: object.init__() takes exactly one argument (the instance to initialize)

Badiboy commented 9 months ago

Thanks. See the issue. This class is unhappy...

Badiboy commented 9 months ago

Try to install and use current GIT version: pip install -U git+https://github.com/eternnoir/pyTelegramBotAPI.git If will not be updated - run: pip uninstall --yes pyTelegramBotAPI before.

Sonys9 commented 9 months ago

thank you!!!