пытаюсь отправить фото, но выдается ошибка:
photo = InputFile('diagram.png')
TypeError: Can't instantiate abstract class InputFile without an implementation for abstract method 'read'
Код:
import asyncio
import logging
from aiogram import Bot, Dispatcher, types
from aiogram.filters.command import Command
from aiogram.types import KeyboardButton, ReplyKeyboardMarkup, Message, InlineKeyboardButton, InlineKeyboardMarkup, InputFile
from api_google_sheet import *
from config import *
import pandas as pd
logging.basicConfig(level=logging.INFO)
bot = Bot(token="7639787045:AAFmWbGCrSIc0iJmzdDUisj2MkpeFtMa8aE")
dp = Dispatcher()
@dp.message(Command("start"))
async def cmd_start(message: types.Message):
photo = InputFile('diagram.png')
await message.answer_photo(photo, caption="caption")