codezjx / netease-cloud-music-dl

Netease cloud music song downloader, with full ID3 metadata, eg: front cover image, artist name, album name, song title and so on.
MIT License
494 stars 81 forks source link

下载歌曲时报错 #50

Closed glerium closed 4 years ago

glerium commented 4 years ago

95: Moon Progress: 100.00%, 4167.80KB, [Wisp X - Moon.mp3] Traceback (most recent call last):ver_466993540.jpg] File "/usr/local/lib/python3.7/dist-packages/PIL/ImageFile.py", line 233, in load s = read(self.decodermaxblock) File "/usr/local/lib/python3.7/dist-packages/PIL/PngImagePlugin.py", line 846, in load_read cid, pos, length = self.png.read() File "/usr/local/lib/python3.7/dist-packages/PIL/PngImagePlugin.py", line 129, in read length = i32(s) File "/usr/local/lib/python3.7/dist-packages/PIL/_binary.py", line 71, in i32be return unpack_from(">I", c, o)[0] struct.error: unpack_from requires a buffer of at least 4 bytes

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/bin/ncm", line 11, in load_entry_point('netease-cloud-music-dl==0.2.0', 'console_scripts', 'ncm')() File "/usr/local/lib/python3.7/dist-packages/netease_cloud_music_dl-0.2.0-py3.7.egg/ncm/start.py", line 76, in main File "/usr/local/lib/python3.7/dist-packages/netease_cloud_music_dl-0.2.0-py3.7.egg/ncm/start.py", line 42, in download_playlist_songs File "/usr/local/lib/python3.7/dist-packages/netease_cloud_music_dl-0.2.0-py3.7.egg/ncm/downloader.py", line 66, in download_song_by_song File "/usr/local/lib/python3.7/dist-packages/netease_cloud_music_dl-0.2.0-py3.7.egg/ncm/file_util.py", line 16, in resize_img File "/usr/local/lib/python3.7/dist-packages/PIL/Image.py", line 2289, in thumbnail im = self.resize(size, resample, box=box, reducing_gap=reducing_gap) File "/usr/local/lib/python3.7/dist-packages/PIL/Image.py", line 1882, in resize im = self.convert(self.mode[:-1] + "a") File "/usr/local/lib/python3.7/dist-packages/PIL/Image.py", line 901, in convert self.load() File "/usr/local/lib/python3.7/dist-packages/PIL/ImageFile.py", line 239, in load raise OSError("image file is truncated") OSError: image file is truncated

codezjx commented 4 years ago

应该是这首歌吧:https://music.163.com/song?id=466993540 我本地暂时无法复现,看log应该是专辑封面图片下载出问题了,导致resize_img的时候异常,重新下载试试~