I Don't really understand why this happing. I currently developing a music bash editing software.
Some files in the folder works fine. Others have error like that.
Traceback (most recent call last):
File "/Users/apple/PycharmProjects/Onsei_manager/main.py", line 41, in
editFilesByMatchingPattern(dirct, audioTup1)
File "/Users/apple/PycharmProjects/Onsei_manager/main.py", line 22, in editFilesByMatchingPattern
onsei_tag.EditAudio(os.path.join(parentDir, filenames),
File "/Users/apple/PycharmProjects/Onsei_manager/onsei_tag.py", line 16, in init
self.embed_pic(path, audiofile, imagepath)
File "/Users/apple/PycharmProjects/Onsei_manager/onsei_tag.py", line 32, in embed_pic
audiofile.save()
File "/Users/apple/PycharmProjects/Onsei_manager/venv/lib/python3.9/site-packages/music_tag/file.py", line 374, in save
self.mfile.save(kwargs)
File "/Users/apple/PycharmProjects/Onsei_manager/venv/lib/python3.9/site-packages/mutagen/_util.py", line 156, in wrapper
return func(self, h, args, kwargs)
File "/Users/apple/PycharmProjects/Onsei_manager/venv/lib/python3.9/site-packages/mutagen/_file.py", line 132, in save
return self.tags.save(filething, kwargs)
File "/Users/apple/PycharmProjects/Onsei_manager/venv/lib/python3.9/site-packages/mutagen/_util.py", line 185, in wrapper
return func(args, kwargs)
File "/Users/apple/PycharmProjects/Onsei_manager/venv/lib/python3.9/site-packages/mutagen/_util.py", line 156, in wrapper
return func(self, h, *args, **kwargs)
File "/Users/apple/PycharmProjects/Onsei_manager/venv/lib/python3.9/site-packages/mutagen/wave.py", line 129, in save
wave_file.insert_chunk(u'id3')
File "/Users/apple/PycharmProjects/Onsei_manager/venv/lib/python3.9/site-packages/mutagen/_iff.py", line 338, in insert_chunk
return self.root.insertchunk(id, data)
File "/Users/apple/PycharmProjects/Onsei_manager/venv/lib/python3.9/site-packages/mutagen/_iff.py", line 260, in insert_chunk
insert_bytes(self._fileobj, size, next_offset)
File "/Users/apple/PycharmProjects/Onsei_manager/venv/lib/python3.9/site-packages/mutagen/_util.py", line 788, in insert_bytes
raise ValueError
ValueError
This sounds like it might be a mutagen issue (or a corrupt file?). Without more context, or an example of how to create a problem file, I'm not sure where to start here.
I Don't really understand why this happing. I currently developing a music bash editing software. Some files in the folder works fine. Others have error like that.
Traceback (most recent call last): File "/Users/apple/PycharmProjects/Onsei_manager/main.py", line 41, in
editFilesByMatchingPattern(dirct, audioTup1)
File "/Users/apple/PycharmProjects/Onsei_manager/main.py", line 22, in editFilesByMatchingPattern
onsei_tag.EditAudio(os.path.join(parentDir, filenames),
File "/Users/apple/PycharmProjects/Onsei_manager/onsei_tag.py", line 16, in init
self.embed_pic(path, audiofile, imagepath)
File "/Users/apple/PycharmProjects/Onsei_manager/onsei_tag.py", line 32, in embed_pic
audiofile.save()
File "/Users/apple/PycharmProjects/Onsei_manager/venv/lib/python3.9/site-packages/music_tag/file.py", line 374, in save
self.mfile.save(kwargs)
File "/Users/apple/PycharmProjects/Onsei_manager/venv/lib/python3.9/site-packages/mutagen/_util.py", line 156, in wrapper
return func(self, h, args, kwargs)
File "/Users/apple/PycharmProjects/Onsei_manager/venv/lib/python3.9/site-packages/mutagen/_file.py", line 132, in save
return self.tags.save(filething, kwargs)
File "/Users/apple/PycharmProjects/Onsei_manager/venv/lib/python3.9/site-packages/mutagen/_util.py", line 185, in wrapper
return func(args, kwargs)
File "/Users/apple/PycharmProjects/Onsei_manager/venv/lib/python3.9/site-packages/mutagen/_util.py", line 156, in wrapper
return func(self, h, *args, **kwargs)
File "/Users/apple/PycharmProjects/Onsei_manager/venv/lib/python3.9/site-packages/mutagen/wave.py", line 129, in save
wave_file.insert_chunk(u'id3')
File "/Users/apple/PycharmProjects/Onsei_manager/venv/lib/python3.9/site-packages/mutagen/_iff.py", line 338, in insert_chunk
return self.root.insertchunk(id, data)
File "/Users/apple/PycharmProjects/Onsei_manager/venv/lib/python3.9/site-packages/mutagen/_iff.py", line 260, in insert_chunk
insert_bytes(self._fileobj, size, next_offset)
File "/Users/apple/PycharmProjects/Onsei_manager/venv/lib/python3.9/site-packages/mutagen/_util.py", line 788, in insert_bytes
raise ValueError
ValueError