Maybe this helps (at least, it is from Greg): https://github.com/rdkit/rdkit/issues/642
Markus On Mon, Jan 21, 2019 at 2:25 PM Jean-Marc Nuzillard < jm.nuzill...@univ-reims.fr> wrote: > My problem is more to know which molecules cause problems > than avoiding the printing of warning messages in the console window. > I am looking for an option that would turn warnings into errors, if any. > > Jean-Marc > > > > Le 21/01/2019 à 13:44, Stephen O'hagan a écrit : > > I've had similar problems; none of the claimed methods to switch off > RDKit logging of warnings has worked for me. > > > > I ended up just re-directing stderr when running the script like this: > > > > python myfile.py 2> myErrorLog.txt > > > > ==================== > > Dr. Steve O'Hagan, > > > > > > -----Original Message----- > > From: Jean-Marc Nuzillard [mailto:jm.nuzill...@univ-reims.fr] > > Sent: 21 January 2019 12:33 > > To: RDKit Discuss <rdkit-discuss@lists.sourceforge.net> > > Subject: [Rdkit-discuss] Warning as error > > > > Dear all, > > > > The minimalist python code: > > reader = Chem.SDMolSupplier('my_file.sdf') > > for mol in reader: > > pass > > > > gives me warning messages when run on a particular SD file. > > How can I simply run a specific action for the molecules that cause > problem, possibly using try/catch statements? > > Best, > > > > Jean-Marc > > > > > > -- > > Jean-Marc Nuzillard > > Directeur de Recherches au CNRS > > > > Institut de Chimie Moléculaire de Reims > > CNRS UMR 7312 > > Moulin de la Housse > > CPCBAI, Bâtiment 18 > > BP 1039 > > 51687 REIMS Cedex 2 > > France > > > > Tel : 03 26 91 82 10 > > Fax : 03 26 91 31 66 > > http://www.univ-reims.fr/ICMR > > http://eos.univ-reims.fr/LSD/CSNteam.html > > > > http://www.univ-reims.fr/LSD/ > > http://www.univ-reims.fr/LSD/JmnSoft/ > > > > > > --- > > L'absence de virus dans ce courrier électronique a été vérifiée par le > logiciel antivirus Avast. > > https://www.avast.com/antivirus > > > > > > > > _______________________________________________ > > Rdkit-discuss mailing list > > Rdkit-discuss@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > > > -- > Jean-Marc Nuzillard > Directeur de Recherches au CNRS > > Institut de Chimie Moléculaire de Reims > CNRS UMR 7312 > Moulin de la Housse > CPCBAI, Bâtiment 18 > BP 1039 > 51687 REIMS Cedex 2 > France > > Tel : 03 26 91 82 10 > Fax : 03 26 91 31 66 > http://www.univ-reims.fr/ICMR > http://eos.univ-reims.fr/LSD/CSNteam.html > > http://www.univ-reims.fr/LSD/ > http://www.univ-reims.fr/LSD/JmnSoft/ > > > > _______________________________________________ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss