Python Eyed3 Warning
Asked Answered
S

1

8

Some of my mp3 files seem to have a non standard genre. When I loop through them (which I have to do in my program) I get tons of warnings like this one :

eyed3.id3:WARNING: Non standard genre name: Rock - Punk/Pop-Punk , Rock - Alternative Rock

How can I prevent eyed3 to print them?

Edit: I get this warning when I load a file e.g. :

mp3_file = eyed3.load( "path to file" ) #I get a warning when I open the 'wrong' file
Soto answered 14/3, 2014 at 11:2 Comment(0)
D
13

You can change the log level in eyed3 to only show errors. Try this:

eyed3.log.setLevel("ERROR")
Darksome answered 1/9, 2014 at 23:46 Comment(2)
Is there a way to catch warnings, as we would with an error?Nephograph
Yes, is there a way to check if file = eyed3.load(filepath) produces a warning or an error (other than watching terminal output)?Humperdinck

© 2022 - 2024 — McMap. All rights reserved.