You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am sure the error is coming from Pyrogram's code and not elsewhere.
I have searched in the issue tracker for similar bug reports, including closed ones.
I ran pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip and reproduced the issue using the latest development version.
Description
Sending with a media group (send_media_group), if one of the videos is without sound, it causes the conversion to animation(gif) and thus the sending fails
If don't upload no sound the 'sample_960x540.mp4' , the remaining two videos will be uploaded successfully
frompyrogramimportClientfrompyrogram.typesimportInputMediaPhoto, InputMediaVideoapi_id=xxxxapi_hash="xxxx"'''I use Sample MP4 from filesamples.com/formats/mp4https://filesamples.com/samples/video/mp4/sample_960x400_ocean_with_audio.mp4https://filesamples.com/samples/video/mp4/sample_960x540.mp4https://filesamples.com/samples/video/mp4/sample_1280x720.mp4'''withClient("xxxx", api_id, api_hash) asclient:
client.send_media_group(
"me",
[
InputMediaVideo('sample_960x400_ocean_with_audio.mp4', caption="a video"),
InputMediaVideo('sample_960x540.mp4'), #This is a video without soundInputMediaVideo('sample_1280x720.mp4'),
]
)
Traceback
The full traceback (if applicable).
Traceback (most recent call last):
File ".\tgup_test.py", line 15, in <module>
client.send_media_group(
File ".\Programs\Python\Python39\lib\site-packages\pyrogram\sync.py", line 56, in async_to_sync_wrap
return loop.run_until_complete(coroutine)
File ".\Programs\Python\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete
return future.result()
File ".\Programs\Python\Python39\lib\site-packages\pyrogram\methods\messages\send_media_group.py", line 272, in send_media_group
r = await self.send(
File ".\Programs\Python\Python39\lib\site-packages\pyrogram\methods\advanced\send.py", line 77, in send
r = await self.session.send(
File ".\Programs\Python\Python39\lib\site-packages\pyrogram\session\session.py", line 425, in send
return await self._send(data, timeout=timeout)
File ".\Programs\Python\Python39\lib\site-packages\pyrogram\session\session.py", line 395, in _send
RPCError.raise_it(result, type(data))
File ".\Programs\Python\Python39\lib\site-packages\pyrogram\errors\rpc_error.py", line 78, in raise_it
raise getattr(
pyrogram.errors.exceptions.bad_request_400.MediaEmpty: [400 MEDIA_EMPTY]: The media you tried to send is invalid (caused by "messages.SendMultiMedia")
Process finished with exit code 1
The text was updated successfully, but these errors were encountered:
Telegram "limitation", not a Pyrogram issue - the error comes straight from the server. Videos inside albums need to have an audio stream, otherwise they are considered animations/gifs.
Checklist
pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip
and reproduced the issue using the latest development version.Description
Sending with a media group (send_media_group), if one of the videos is without sound, it causes the conversion to animation(gif) and thus the sending fails
If don't upload no sound the 'sample_960x540.mp4' , the remaining two videos will be uploaded successfully
Traceback
The full traceback (if applicable).
The text was updated successfully, but these errors were encountered: