vb64 / telemulator3

Mocked Telegram Bot API elements for unit tests of a bot based on the pyTelegramBotAPI library.
MIT License
3 stars 1 forks source link

cant launch example #27

Closed KlyukinSA closed 4 months ago

KlyukinSA commented 4 months ago

i just repeat README test (/tests/test/test_readme.py

here is what i get:

Traceback (most recent call last):
  File "/home/stepan/6sem/kpo/test.py", line 35, in <module>
    send_command(chat, '/start', user)
  File "/home/stepan/.local/lib/python3.10/site-packages/telemulator3/__init__.py", line 77, in send_command
    return chat.send(Command(chat, from_user, command, **kwargs))
  File "/home/stepan/.local/lib/python3.10/site-packages/telemulator3/chat/base.py", line 64, in send
    self.creator.api.send_update(
  File "/home/stepan/.local/lib/python3.10/site-packages/telemulator3/api.py", line 192, in send_update
    update = TeleUpdate(
TypeError: Update.__init__() missing 8 required positional arguments: 'message_reaction', 'message_reaction_count', 'removed_chat_boost', 'chat_boost', 'business_connection', 'business_message', 'edited_business_message', and 'deleted_business_messages'
vb64 commented 4 months ago

Most likely you are using the actual latest version of pyTelegramBotAPI.

This project supports pyTelegramBotAPI versions up to 4.11.0 (see requirements.txt)

KlyukinSA commented 4 months ago

can a library check the version before trying to use the current version

vb64 commented 4 months ago

The new telemulator3 version 1.5 checks for required pyTelegramBotAPI version on install.