Использую aiogram для написания бота. Хочу отправить изображение методом send_photo, передав url изображения, но возникает исключение:
aiogram.utils.exceptions.WrongFileIdentifier: Wrong file identifier/http url specified
url, который передаю:
https://magnit.ru/upload/iblock/1fd/1fd52236b1e847c5a19610f983b69e0f.png
Код:
from aiogram import Dispatcher
from aiogram.dispatcher.filters import Command
from aiogram.types import Message
from tgbot.keyboards.reply import choice_company
async def start(message: Message):
await message.bot.send_photo(chat_id=message.chat.id,
photo='https://magnit.ru/upload/iblock/1fd/1fd52236b1e847c5a19610f983b69e0f.png')
def register_start(dp: Dispatcher):
dp.register_message_handler(start, Command('start'))