Hi Bharath,

That's curious. I would normally expect that error message to occur because
libpng is not installed and PIL/Pillow can't find it.

This isn't an error that you need to be particularly concerned about if you
just plan to use the RDKit. As long as you have either py2cairo or aggdraw
installed (or you are using the new molecule drawing code and have cairo
installed), you will be able to produce PNGs without using the pidPIL
pieces.

If you are planning to do RDKit development and would like the tests to
pass, then we'll need to figure out what is going on here.

One quick question, in the first message, you say that you're using Red Hat
4.4.6-4. Am I correct in assuming that's a typo? Maybe that's the gcc
version that you're using on an RHEL6 box?

-greg




On Wed, Jun 3, 2015 at 12:11 AM, Bharath Ramsundar <
[email protected]> wrote:

> As a quick update, I verified that I'm able to load and save png files
> using PIL from ipython.
>
> On Tue, Jun 2, 2015 at 3:08 PM, Bharath Ramsundar <
> [email protected]> wrote:
>
>> Hi,
>>
>> I've built rdkit from source (cloned from github) on a Red Hat 4.4.6-4
>> box. This is a local install, since my account is a user on a cluster here.
>> The build goes through, but when I run ctest afterwards, pythonTestDirChem
>> fails (all other tests pass). The failure appears to come from a KeyError
>> raised when pidPIL.py attempts to save a file
>>
>> KeyError: '.png'
>>
>> I installed PIL using
>>
>> pip install Pillow
>>
>> Do you folks have any thoughts on what might be going wrong here? I've
>> copied the full output from the failing test below:
>>
>> .........E..
>> ======================================================================
>> ERROR: testSpingFile (__main__.TestCase)
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File "UnitTestDraw.py", line 76, in testSpingFile
>>     Draw.MolToFile(self.mol,fn)
>>   File "/home/rbharath/rdkit/rdkit/Chem/Draw/__init__.py", line 182, in
>> MolToFile
>>     canvas.save()
>>   File "/home/rbharath/rdkit/rdkit/Chem/Draw/spingCanvas.py", line 111,
>> in save
>>     self.canvas.save()
>>   File "/home/rbharath/rdkit/rdkit/sping/PIL/pidPIL.py", line 166, in save
>>     self._image.save(filename, format=format)
>>   File
>> "/home/rbharath/lib/python/lib/python2.7/site-packages/PIL/Image.py", line
>> 1678, in save
>>     raise KeyError(ext)  # unknown extension
>> KeyError: '.png'
>>
>> ----------------------------------------------------------------------
>> Ran 12 tests in 0.652s
>>
>> FAILED (errors=1)
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:09] non-ring atom 1 marked aromatic
>> [14:58:10] non-ring atom 1 marked aromatic
>> [14:58:10] non-ring atom 1 marked aromatic
>> [14:58:10] non-ring atom 1 marked aromatic
>> [14:58:10] non-ring atom 1 marked aromatic
>> [14:58:10] non-ring atom 1 marked aromatic
>> [14:58:10] non-ring atom 1 marked aromatic
>> [14:58:10] non-ring atom 1 marked aromatic
>> [14:58:10] non-ring atom 1 marked aromatic
>> [14:58:10] non-ring atom 1 marked aromatic
>> [14:58:10] non-ring atom 1 marked aromatic
>> [14:58:10] non-ring atom 1 marked aromatic
>> [14:58:10] non-ring atom 1 marked aromatic
>> .
>> ----------------------------------------------------------------------
>> Ran 1 test in 0.068s
>>
>> OK
>> <end of output>
>> Test time =  54.67 sec
>> ----------------------------------------------------------
>> Test Failed.
>> "pythonTestDirChem" end time: Jun 02 14:58 PDT
>> "pythonTestDirChem" time elapsed: 00:00:54
>> ----------------------------------------------------------
>>
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
------------------------------------------------------------------------------
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to