eternnoir / pyTelegramBotAPI

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

GiveawayCreated de_json raises NotImplementedError when the bot starts #2178

Closed KimmyXYC closed 8 months ago

KimmyXYC commented 8 months ago

Please answer these questions before submitting your issue. Thanks!

  1. What version of pyTelegramBotAPI are you using? 4.16.0
  2. What OS are you using? Ubuntu 20.04.5 LTS x86_64
  3. What version of python are you using? 3.8.10
2024-02-17 13:06:21,328 (asyncio_helper.py:93 MainThread) DEBUG - TeleBot: "Request: method=get url=getUpdates params=<aiohttp.formdata.FormData object at 0x7ff7354aa8b0> files=None request_timeout=300 current_try=1"
2024-02-17 13:06:21,329 (async_telebot.py:455 MainThread) ERROR - TeleBot: "Unhandled exception (full traceback for debug level): "
2024-02-17 13:06:21,329 (async_telebot.py:456 MainThread) DEBUG - TeleBot: "Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/telebot/async_telebot.py", line 421, in _process_polling
    updates = await self.get_updates(offset=self.offset, allowed_updates=allowed_updates, timeout=timeout, request_timeout=request_timeout)
  File "/usr/local/lib/python3.8/dist-packages/telebot/async_telebot.py", line 223, in get_updates
    return [types.Update.de_json(ju) for ju in json_updates]
  File "/usr/local/lib/python3.8/dist-packages/telebot/async_telebot.py", line 223, in <listcomp>
    return [types.Update.de_json(ju) for ju in json_updates]
  File "/usr/local/lib/python3.8/dist-packages/telebot/types.py", line 190, in de_json
    message = Message.de_json(obj.get('message'))
  File "/usr/local/lib/python3.8/dist-packages/telebot/types.py", line 1285, in
de_json
    opts['giveaway_created'] = GiveawayCreated.de_json(obj['giveaway_created'])
  File "/usr/local/lib/python3.8/dist-packages/telebot/types.py", line 76, in de_json
    raise NotImplementedError
NotImplementedError
KimmyXYC commented 8 months ago

There's a new error. It's still on Giveaway.

Badiboy commented 8 months ago

Hmm... Definitely not implemented...

Badiboy commented 8 months ago

https://github.com/eternnoir/pyTelegramBotAPI/pull/2179

Check github version pls.

KimmyXYC commented 8 months ago

2179

Check github version pls.

I tried the new version and now the bot works fine!

Badiboy commented 8 months ago

Thank you.

Pushed to pypi.