I have been attempting to use the eyed3 module for tagging mp3 files, but unfortunately, I find the module documentation difficult to understand and was wondering if someone can help me?.. Documentation can be found at https://eyed3.readthedocs.io
I was trying to use it to remove existing album art image using:
import eyed3
x = eyed3.load('file_path')
x.tag._images.remove()
x.tag.save()
But when I run this code, it gives me the following error:
TypeError: remove() missing 1 required positional argument: 'description'
I am not sure where to find the above mentioned description
to pass as a parameter. I have also looked at the source python file for eyed3 tagging, but based on investigating the code, I can't seem to find out what to pass for this argument description
.
I attempted to pass an empty string as the argument, but although the script ran fine without any errors, it did not remove the album art image.
Please help.
After digging around a bit,
description
is literally just the description of the image. When you callx.tag.images
you get an ImageAccessor object, which is basically just an iterable containing your images. If you castx.tag.images
to a list, you can see it contains 1 ImageFrame object (in my test case). When you callx.tag.images.remove()
, eyed3 needs to know which image to remove, and it selects the image to remove based on the image description. You can get the descriptions of each image using something like this.Once you know the description of the image you want to remove, you should be able to pass it into the remove function, and that specific image will be removed.