При изменении медиа-файла столкнулся с ошибкой aiogram.utils.exceptions.BadRequest: Wrong http url specified .
Код:
photo1 = types.InputMediaPhoto('avatar/photos/file_8.jpg')
await bot.edit_message_media(media=photo1, chat_id=call.from_user.id, message_id=call.message.message_id)
Из-за чего возникает эта ошибка?
Весь текст ошибки:
ERROR:asyncio:Task exception was never retrieved
future: exception=BadRequest('Wrong http url specified')>
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 415, in _process_polling_updates
for responses in itertools.chain.from_iterable(await self.process_updates(updates, fast)):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 235, in process_updates
return await asyncio.gather(*tasks)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\handler.py", line 116, in notify
response = await handler_obj.handler(*args, **partial_data)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 283, in process_update
return await self.callback_query_handlers.notify(update.callback_query)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\handler.py", line 116, in notify
response = await handler_obj.handler(*args, **partial_data)
File "C:\Users\User\Desktop\testsearchanon\main.py", line 800, in oz1
await bot.edit_message_media(media=photo1, chat_id=call.from_user.id, message_id=call.message.message_id)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\bot\bot.py", line 2743, in edit_message_media
result = await self.request(api.Methods.EDIT_MESSAGE_MEDIA, payload, files)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\bot\base.py", line 231, in request
return await api.make_request(await self.get_session(), self.server, self.__token, method, data, files,
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\bot\api.py", line 140, in make_request
return check_result(method, response.content_type, response.status, await response.text())
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\bot\api.py", line 115, in check_result
exceptions.BadRequest.detect(description)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\utils\exceptions.py", line 141, in detect
raise cls(description)
aiogram.utils.exceptions.BadRequest: Wrong http url specified