I
I
Ivan Yakushenko2019-04-25 17:57:45
Python
Ivan Yakushenko, 2019-04-25 17:57:45

Why does the bot disconnect with an error when sending a message?

There is the following code, which outputs the bot's events to the console:

def start(self):
        for event in self.long_poll.listen():
            print(event)

If you just type something in the dialog, then the event is listened to correctly:
<({'type': 'message_typing_state', 'object': {'state': 'typing', 'from_id': ######, 'to_id': -######}, 'group_id ': ######})>

But as soon as you send a message, an error occurs:
TypeError: '<' not supported between instances of 'NoneType' and 'int'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2019-04-25
@kshnkvn

This is a bug . It is treated by changing the API version.
46371166-521ca780-c690-11e8-976b-20c7e7d

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question