Hello everybody, I am trying to convert a large amount of mol files to png. Some mol files cause the following error with "Draw.MolToFile":
<< Could not convert io integer: 3221225477. Path 'exitCode'. Der Wert für einen Int32 war zu groß oder klein. (The value for an Int32 was too large or small.) >> I would like to catch this error to simply omit these files but despite "try" the program exits with the above error. I have attached a problematic mol-file as an example. The program code looks like this: from rdkit import Chem from rdkit.Chem import Draw from try_parse.utils import ParseUtils Testmol = Chem.MolFromMolFile('C:\\Struct\\191131.mol') try: print('now we test: ') Draw.MolToFile(Testmol,'C:\\Struct\\Test191131.png') # i also tried this: #test=ParseUtils.try_parse_int(Draw.MolToFile(Testmol,'C:\\Struct\\Test191131.png')) #print(test) except: print('I never reach this except but the programm stopps') Many thanks! Rüdiger Lang Freundliche Grüße / Kind regards Rüdiger Lang Data Analyst abcr GmbH Im Schlehert 10 76187 Karlsruhe Germany r.l...@abcr.com
191133.mol
Description: 191133.mol
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss