Hi Noel, that worked! For the record, this is the code: --------- from openbabel import openbabel as ob ob.obErrorLog.SetOutputLevel(0) ---------
Thank you much for the help! Happy holidays, Best, S -- Stefano Forli, PhD Assistant Professor Dept. of Integrative Structural and Computational Biology, MB-112A The Scripps Research Institute 10550 North Torrey Pines Road La Jolla, CA 92037-1000, USA. tel: +1 (858)784-2055 fax: +1 (858)784-2860 email: fo...@scripps.edu http://www.scripps.edu/~forli/ ________________________________________ From: Noel O'Boyle <baoille...@gmail.com> Sent: Saturday, December 19, 2020 1:40 AM To: Stefano Forli Cc: openbabel-discuss@lists.sourceforge.net Subject: Re: [Open Babel] Prevent warning messages (Python, OB 3.1.0) 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<mailto: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<mailto:fo...@scripps.edu> https://forlilab.org _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net<mailto: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