Hi Gianluca,

It looks like that function is not available with pycairo for Python3:
http://cairographics.org/documentation/pycairo/3/reference/surfaces.html#cairo.ImageSurface.create_for_data
It is (or should be) available in cairocffi:
https://pythonhosted.org/cairocffi/api.html#cairocffi.ImageSurface.create_for_data

If both pycairo and cairocffi are installed, the code will prefer cairocffi
with python3.

-greg


On Thu, Dec 3, 2015 at 4:13 PM, Gianluca Sforna <gia...@gmail.com> wrote:

> Hi all,
> my attempt to build and test python3 bindings in the rpm package is
> one tiny test away from success...
>
> Specifically, I see test 101 fails with:
>
> 101: ======================================================================
> 101: ERROR: testCairoImage (__main__.TestCase)
> 101: ----------------------------------------------------------------------
> 101: Traceback (most recent call last):
> 101:   File "UnitTestDraw.py", line 91, in testCairoImage
> 101:     img=Draw.MolToImage(self.mol,size=(300,300))
> 101:   File
> "/builddir/build/BUILD/rdkit-Release_2015_09_2/python3/rdkit/Chem/Draw/__init__.py",
> line 94, in MolToImage
> 101:     img,canvas=_createCanvas(size)
> 101:   File
> "/builddir/build/BUILD/rdkit-Release_2015_09_2/python3/rdkit/Chem/Draw/__init__.py",
> line 50, in _createCanvas
> 101:     canvas = Canvas(img)
> 101:   File
> "/builddir/build/BUILD/rdkit-Release_2015_09_2/python3/rdkit/Chem/Draw/cairoCanvas.py",
> line 86, in __init__
> 101:     image.size[0], image.size[1], stride)
> 101: NotImplementedError: Surface.create_for_data: Not Implemented yet.
>
> Any idea how this could happen? If you need any additional info, just
> let me know
>
>
> --
> Gianluca Sforna
>
> http://morefedora.blogspot.com
> http://plus.google.com/+gianlucasforna - http://twitter.com/giallu
>
>
> ------------------------------------------------------------------------------
> Go from Idea to Many App Stores Faster with Intel(R) XDK
> Give your users amazing mobile app experiences with Intel(R) XDK.
> Use one codebase in this all-in-one HTML5 development environment.
> Design, debug & build mobile apps & 2D/3D high-impact games for multiple
> OSs.
> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
> _______________________________________________
> Rdkit-devel mailing list
> Rdkit-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-devel
>
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
Rdkit-devel mailing list
Rdkit-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-devel

Reply via email to