Hi Rüdiger,
It looks like it has exited rather than raising an exception. I would
interpret that as it being very unimpressed with the molecule. I’ll take a
look at it tomorrow morning.
Dave



On Fri, 2 Sep 2022 at 13:40, Rüdiger Lang <r.l...@abcr.com> wrote:

> 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
> <https://www.google.com/maps/search/Im+Schlehert+10+%0D%0A76187+Karlsruhe+%0D%0AGermany?entry=gmail&source=g>
> 76187 Karlsruhe
> <https://www.google.com/maps/search/Im+Schlehert+10+%0D%0A76187+Karlsruhe+%0D%0AGermany?entry=gmail&source=g>
> Germany
> <https://www.google.com/maps/search/Im+Schlehert+10+%0D%0A76187+Karlsruhe+%0D%0AGermany?entry=gmail&source=g>
>
> r.l...@abcr.com
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
-- 
David Cosgrove
Freelance computational chemistry and chemoinformatics developer
http://cozchemix.co.uk
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to