FranGar
FranGar

Reputation: 137

Python Filter Warnings from third party module 'eyed3'

It's posible to filter, at runtime, the Warnings raised from the imported eyed3 module during a re-taging operation ?

It result in:

WARNING:eyed3.mp3.headers:Lame tag CRC check failed WARNING:eyed3.id3:Non standard genre name: Roman sentimental

For the sake of information: The first Warning come from the eyed3.load('song') call. (The song it's been mp3 converted in Audacity with the ffmpeg FFmpeg mp3 lame encoder.) The second from the tag() 'genre' assignment.

Upvotes: 0

Views: 733

Answers (1)

nicfit
nicfit

Reputation: 76

Since this is a log warning you can filter it out by changing the log-level that logger:

import logging
logging.getLogger("eyed3.mp3.headers").setLevel(logging.CRITICAL)

Upvotes: 4

Related Questions