🐛 修复制图plt出错

This commit is contained in:
CMHopeSunshine 2023-07-22 14:44:35 +08:00
parent 1352f5e37c
commit 90359f2fc9

View File

@ -2,6 +2,7 @@ from io import BytesIO
from pathlib import Path
from typing import Tuple, Union, Literal, List, Optional, Dict, Any
import matplotlib.pyplot as plt
from PIL import Image, ImageDraw, ImageFont, ImageOps
from PIL.ImageFont import FreeTypeFont
from nonebot.utils import run_sync
@ -10,7 +11,7 @@ from LittlePaimon.config import config
from .path import FONTS_PATH
from .requests import aiorequests
plt.switch_backend('agg')
class PMImage: