в Телеграм CLI? И как ловить респонсы правильно?
Похоже я превышал лимит и сейчас получаю:
Traceback (most recent call last):
File "/home/user/www/pytg/test.py", line 112, in <module>
main() # executing main function.
File "/home/user/www/pytg/test.py", line 29, in main
receiver.message(example_function(sender)) # now it will call the example_function and yield the new messages.
File "/usr/local/lib/python2.7/dist-packages/pytg-0.4.10-py2.7.egg/pytg/utils.py", line 29, in start
cr = func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pytg-0.4.10-py2.7.egg/pytg/receiver.py", line 212, in message
function.send(message)
File "/home/user/www/pytg/test.py", line 75, in example_function
results = sender.resolve_username(msg.text[1:])
File "/usr/local/lib/python2.7/dist-packages/pytg-0.4.10-py2.7.egg/pytg/sender.py", line 632, in command_alias
return self.execute_function(command_name, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pytg-0.4.10-py2.7.egg/pytg/sender.py", line 322, in execute_function
result = self._do_send(request, answer_timeout=self.default_answer_timeout, retry_connect=retry_connect)
File "/usr/local/lib/python2.7/dist-packages/pytg-0.4.10-py2.7.egg/pytg/sender.py", line 529, in _do_send
raise NoResponse(command)
pytg.exceptions.NoResponse: [disable_preview] resolve_username betteren
Ну если ты дёргал сразу пачку запросов за раз, то сервер тебя просто погасил на период от пары секунд до пары суток
Обсуждают сегодня