aiotdlib icon indicating copy to clipboard operation
aiotdlib copied to clipboard

ValidationError in send_photo()

Open truenicoco opened this issue 1 year ago • 1 comments

client.send_photo() has a default photo_width parameter of None, which attempts to construct a InputMessagePhoto with None as width, raising a pydantic validation error. A workaround is to pass 0. Same goes for photo_height, added_sticker_file_ids which is None when it should be an empty list.

send_video() and send_audio() have similar issues.

truenicoco avatar Jul 11 '24 18:07 truenicoco

Thanks a lot, I will have a look later

pylakey avatar Jul 14 '24 22:07 pylakey