That creates a new message handler. You need to get hold of the existing one. It's something like obErrorLog. If you use dir() on ob, you will find the exact name.
On Fri, 18 Dec 2020, 23:38 Stefano Forli, <fo...@scripps.edu> wrote: > Hi, > > I'm having a hard time disabling warning messages using the > OBMessageHandler class using Python and OB 3.1.0 (installed from Conda): > > ... > ============================== > *** Open Babel Warning in PerceiveBondOrders > Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders > ... > > I have tried the following code to suppress the messages with no success > (I've stopped the logging after trying changing the output level): > > ob_log = ob.OBMessageHandler() > ob_log.SetOutputLevel(0) > ob_log.StopLogging() > > Suggestions are welcome. > > S > > -- > > Stefano Forli, PhD > > Assistant Professor > Dept. of Integrative Structural > and Computational Biology, MB-112A > Scripps Research > 10550 North Torrey Pines Road > La Jolla, CA 92037-1000, USA. > > tel: +1 (858)784-2055 > email: fo...@scripps.edu > https://forlilab.org > > > > _______________________________________________ > OpenBabel-discuss mailing list > OpenBabel-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss >
_______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss