Advertisement
Guest User

Untitled

a guest
Feb 20th, 2020
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.03 KB | None | 0 0
  1. @app.on_message(Filters.command("info",","))
  2. def my_handler(client, message):
  3.     info = app.get_users(message.reply_to_message.from_user.id)
  4.     app.send_photo(message.chat.id, info['photo']['small_file_id'])
  5.  
  6.  
  7. /* Error:
  8.  
  9. Expected: "photo", got "chat_photo" file_id instead
  10. Traceback (most recent call last):
  11.   File "/usr/local/lib/python3.5/dist-packages/pyrogram/client/ext/dispatcher.py", line 199, in update_worker
  12.     handler.callback(self.client, *args)
  13.   File "pyro.py", line 69, in my_handler
  14.     app.send_photo(message.chat.id, info['photo']['small_file_id'])
  15.   File "/usr/local/lib/python3.5/dist-packages/pyrogram/client/methods/messages/send_photo.py", line 152, in send_photo
  16.     media = utils.get_input_media_from_file_id(photo, file_ref, 2)
  17.   File "/usr/local/lib/python3.5/dist-packages/pyrogram/client/ext/utils.py", line 112, in get_input_media_from_file_id
  18.     'Expected: "{}", got "{}" file_id instead'.format(expected_media_type_str, media_type_str)
  19. ValueError: Expected: "photo", got "chat_photo" file_id instead
  20. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement