Hi all,

I must be missing something obvious:

pybel.readfile( "sdf", sdf, opt = { "canonical" : None } ).next()
File "/opt/lib/pybel.py", line 145, in filereader
notatend = obconversion.ReadFile(obmol,filename)
TypeError: in method 'OBConversion_ReadFile', argument 3 of type
'std::string'

This is from the 'if' fork of

if infile == None :
    sdfs = glob.glob( "%s/*.sdf" % (self._workdir) )
    if len( sdfs ) < 1 : return False
    filename = os.path.split( sdfs[0] )[1]
else :
    filename = os.path.split( infile )[1]
sdf = "%s/%s" % (self._workdir, filename)
print >> sys.stderr, sdf
self._obmol = pybel.readfile( "sdf", sdf, opt={"canonical":None}).next()

The 'else' fork works. In both cases the filename is logged as (e.g.)
/var/tmp/bm30/92802.sdf and it is the same file.

Can anyone spot the problem?

Thanks,
-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to