On Oct 24, 2014, at 1:47 AM, ftorazyne wrote: > On my system this code produced other output: ... > SetInFormat("smi") return False, but "smi" is in supported formats. > Cannot this error be connected with encoding? My system encoding is UTF8 and > I every time specify this encoding in Python files.
It shouldn't, because "smi" is the same in ASCII and UTF-8. Still, it's a better lead than what I have. Try setting your LC_ALL environment variable to "C" before running Python. That should make everything be locale ignorant. If you to be a bit daft, try asking it for all formats of up to 6 letters. At the very least this will see if anything is loading: import string import itertools import openbabel as ob conv = ob.OBConversion() for length in range(1, 7): print "Trying words of length", length for letters in itertools.product(*((string.ascii_lowercase,)*length)): word = "".join(letters) if conv.SetInFormat(word): print repr(word) My output starts with: Trying words of length 1 Trying words of length 2 'bs' 'ck' 'ct' 'dx' 'fa' 'fs' 'pc' 'sd' Trying words of length 3 'acr' 'alc' Andrew da...@dalkescientific.com ------------------------------------------------------------------------------ _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss