beetbox / mediafile

elegant audio file tagging
http://mediafile.readthedocs.io/
MIT License
97 stars 24 forks source link

Misleading error message #31

Closed adamjakab closed 3 years ago

adamjakab commented 4 years ago

https://github.com/beetbox/mediafile/blob/8846cdf226ee61ec181b03f0133046bc37cebd3d/mediafile.py#L1611

should read: ... "already exists on MediaFile" not MediaField.

sampsyo commented 4 years ago

Thanks!! Would you like to do the honors of opening a pull request so you get the credit? :smiley:

JuniorJPDJ commented 3 years ago

@adamjakab have you fixed it and done pull request? I'm not sure why that easy issue is still open :D

adamjakab commented 3 years ago

Hey @JuniorJPDJ - thanks for the note. At the moment I have no bandwidth to do this. Would you be able to do it?

arogl commented 3 years ago

Not a misspelling from what I can interpret here:

https://github.com/beetbox/mediafile/blob/8846cdf226ee61ec181b03f0133046bc37cebd3d/mediafile.py#L32-L35

JuniorJPDJ commented 3 years ago

I just read the surrounding code and it seems correct for me too.

sampsyo commented 3 years ago

I changed it! It's a little confusing, but here cls is MediaFile itself, while descriptor is a MediaField instance—and the error is trying to say "this MediaField already exists on MediaFile".