Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/345.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PythonEyed3警告_Python_Warnings_Eyed3 - Fatal编程技术网

PythonEyed3警告

PythonEyed3警告,python,warnings,eyed3,Python,Warnings,Eyed3,我的一些mp3文件似乎有非标准类型。当我循环它们时(我必须在我的程序中这样做),我会收到大量类似这样的警告: eyed3.id3:WARNING: Non standard genre name: Rock - Punk/Pop-Punk , Rock - Alternative Rock 如何防止eyed3打印它们 编辑: 我在加载文件时收到此警告,例如: mp3_file = eyed3.load( "path to file" ) #I get a warning when I open

我的一些mp3文件似乎有非标准类型。当我循环它们时(我必须在我的程序中这样做),我会收到大量类似这样的警告:

eyed3.id3:WARNING: Non standard genre name: Rock - Punk/Pop-Punk , Rock - Alternative Rock
如何防止eyed3打印它们

编辑: 我在加载文件时收到此警告,例如:

mp3_file = eyed3.load( "path to file" ) #I get a warning when I open the 'wrong' file

您可以更改eyed3中的日志级别,以仅显示错误。试试这个:

eyed3.log.setLevel("ERROR")

是否有一种方法可以捕获警告,就像我们在错误中捕获警告一样?