We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here's a python3 example. The stream error is caused by another problem that still needs to be tracked down:
In [1]: from rdkit import Chem In [2]: import gzip In [3]: m = Chem.MolFromSmiles('C') In [4]: f = gzip.open('/tmp/out.sdf.gz','wb+') In [5]: w = Chem.SDWriter(f) In [6]: w.write(m) In [7]: w.flush() --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-7-bc2f85e59f78> in <module>() ----> 1 w.flush() /home/glandrum/anaconda/envs/py34/lib/python3.4/gzip.py in write(self, data) 341 if len(data) > 0: 342 self.size = self.size + len(data) --> 343 self.crc = zlib.crc32(data, self.crc) & 0xffffffff 344 self.fileobj.write( self.compress.compress(data) ) 345 self.offset += len(data) TypeError: 'str' does not support the buffer interface In [8]: w.close() --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-8-cae8a84f7881> in <module>() ----> 1 w.close() /home/glandrum/anaconda/envs/py34/lib/python3.4/gzip.py in write(self, data) 341 if len(data) > 0: 342 self.size = self.size + len(data) --> 343 self.crc = zlib.crc32(data, self.crc) & 0xffffffff 344 self.fileobj.write( self.compress.compress(data) ) 345 self.offset += len(data) TypeError: 'str' does not support the buffer interface In [9]: w=None terminate called after throwing an instance of 'boost::python::error_already_set' Aborted (core dumped)
The text was updated successfully, but these errors were encountered:
fef20e9
Fixes #498
ee20293
Fixes rdkit#498
ba937cf
37c9349
No branches or pull requests
Here's a python3 example. The stream error is caused by another problem that still needs to be tracked down:
The text was updated successfully, but these errors were encountered: