как отправить скриншот turtle в telebot
Хочу сделать так чтобы просто скриншот turtle отправлялся пользователю, но все время выдается ошибка
telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: IMAGE_PROCESS_FAILED
мне кажется что ошибка в формате файл, но как бы не было, в чем реальная ошибка, подскажите пожалуйста
import turtle
import telebot
t = turtle.Turtle()
t.speed(0)
t.fd(40)
screen = t.screen
screen.getcanvas().postscript(file="file.jpg")
bot = telebot.TeleBot('<ТОКЕН>')
@bot.message_handler(commands=["start"])
def func(message):
bot.send_message(message.chat.id, "hello")
photo = open("file.jpg", "rb")
bot.send_photo(message.chat.id, photo)
bot.polling()