Hi Kirk,
Welcome back!
Those were fixed for the 2015.09 release:
https://github.com/rdkit/rdkit/pull/644
Best,
-greg
On Mon, Apr 18, 2016 at 1:11 AM, Robert DeLisle <[email protected]> wrote:
> Long time no message!
>
> Anywho, I've been working today with RDKit 2015.03.01 and in the process
> of generating a grid of molecule depictions (Draw.MolsToGridImage()), I
> received the error message below.
>
> From the last line, it seems there has been an API change that changes
> tostring() to tobytes(). I also found that fromstring() needs to change to
> frombytes().
>
> When I made these changes and saved the results, everything works fine. I
> thought it might be useful to know given the upcoming release.
>
> -Kirk
>
>
>
> raceback (most recent call last):
> File "GenerateStructFigures.py", line 57, in <module>
> legends = lbls)
> File
> "/storage/software/RDKit/RDKit_current/rdkit/Chem/Draw/__init__.py", line
> 316, in MolsToGridImage
> **kwargs),(col*subImgSize[0],row*subImgSize[1]))
> File
> "/storage/software/RDKit/RDKit_current/rdkit/Chem/Draw/__init__.py", line
> 94, in MolToImage
> img,canvas=_createCanvas(size)
> File
> "/storage/software/RDKit/RDKit_current/rdkit/Chem/Draw/__init__.py", line
> 50, in _createCanvas
> canvas = Canvas(img)
> File
> "/storage/software/RDKit/RDKit_current/rdkit/Chem/Draw/cairoCanvas.py",
> line 67, in __init__
> imgd = image.tostring("raw","BGRA")
> File "/usr/lib64/python2.7/site-packages/PIL/Image.py", line 686, in
> tostring
> "Please call tobytes() instead.")
> Exception: tostring() has been removed. Please call tobytes() instead.
>
>
>
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications
> Manager
> Applications Manager provides deep performance insights into multiple
> tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss