我正在尝试使用枕头下载图像,然后将该图像提供给 eyed3 以用作专辑封面,但出现以下错误:
TypeError: can't concat JpegImageFile to bytes
response = requests.get(album_art_url)
img = Image.open(BytesIO(response.content))
audiofile = eyed3.load(f"{self.current_song_name}-{self.current_song_url}.mp3")
audiofile.tag.images.set(type_=3, img_data=img,
mime_type="image/jpeg",
description=None,
img_url=None)
audiofile.tag.save()