You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 3.7.8 | packaged by conda-forge | (default, Nov 17 2020, 23:45:15)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from rdkit import Chem
>>> a = Chem.MolFromSmiles('CCCCC')
>>> from rdkit.Chem.Draw import MolToImage
>>> b = MolToImage(a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/miniconda3/envs/uii/lib/python3.7/site-packages/rdkit/Chem/Draw/__init__.py", line 101, in MolToImage
img, canvas = _createCanvas(size)
File "/data/miniconda3/envs/uii/lib/python3.7/site-packages/rdkit/Chem/Draw/__init__.py", line 56, in _createCanvas
canvas = Canvas(img)
File "/data/miniconda3/envs/uii/lib/python3.7/site-packages/rdkit/Chem/Draw/cairoCanvas.py", line 147, in __init__
imgd = getattr(image, 'tobytes', image.tostring)("raw", "BGRA")
AttributeError: 'Image' object has no attribute 'tostring'
Configuration (please complete the following information):
RDKit version: 2019.09.3
OS: centos
Python version (if relevant): 3.7.8
Are you using conda? yes
If you are using conda, which channel did you install the rdkit from? conda-forge
The text was updated successfully, but these errors were encountered:
Describe the bug
MolToImage
not workingTo Reproduce
Configuration (please complete the following information):
The text was updated successfully, but these errors were encountered: