From 90359f2fc9da89561a750fca0667d31ca633de0c Mon Sep 17 00:00:00 2001 From: CMHopeSunshine <277073121@qq.com> Date: Sat, 22 Jul 2023 14:44:35 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E5=88=B6=E5=9B=BEplt?= =?UTF-8?q?=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LittlePaimon/utils/image.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LittlePaimon/utils/image.py b/LittlePaimon/utils/image.py index a22fe3d..abb3b31 100644 --- a/LittlePaimon/utils/image.py +++ b/LittlePaimon/utils/image.py @@ -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: