Error occured when adding an artwork to a m4a file on Windows, however, it's success on macOS and Linux.
failed on my project on windows
test with code
import music_tag
a = music_tag.load_file(r'E:\Users\Documents\GitHub\ASoulMP3maker\a.m4a')
a['artwork'] = open(r'E:\Users\Documents\GitHub\ASoulMP3maker\j.jpg','rb').read()
a.save()
error info on window
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\17374\AppData\Local\Programs\Python\Python39\lib\site-packages\music_tag\file.py", line 603, in __setitem__
self.set(norm_key, val)
File "C:\Users\17374\AppData\Local\Programs\Python\Python39\lib\site-packages\music_tag\file.py", line 503, in set
tmap.setter(self, norm_key, val)
File "C:\Users\17374\AppData\Local\Programs\Python\Python39\lib\site-packages\music_tag\mp4.py", line 99, in set_artwork
raise TypeError('mp4 artwork should be either jpeg or png')
TypeError: mp4 artwork should be either jpeg or png
Error occured when adding an artwork to a m4a file on Windows, however, it's success on macOS and Linux.
failed on my project on windows test with code
error info on window
success on linux
Here is the m4a file i wanna edit.
musicfile.zip