Repository navigation
Closed
Closed
Copy link
Labels
Description
Noticed on TravisCI, it looks like a new release of Pillow and/or ReportLab broke things:
e.g. Python 2.7 and 3.5 here:
https://travis-ci.org/biopython/biopython/builds/514538956
======================================================================
ERROR: test_render_KGML_basic (test_KGML_graphics.KGMLPathwayTest)
Basic rendering of KGML: write to PDF without modification.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/biopython/biopython/Tests/test_KGML_graphics.py", line 115, in test_render_KGML_basic
kgml_map.draw(p.output_stem + '_original.pdf')
File "/home/travis/build/biopython/biopython/build/lib.linux-x86_64-2.7/Bio/Graphics/KGML_vis.py", line 158, in draw
self.drawing.drawImage(imfilename, 0, 0)
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/pdfgen/canvas.py", line 947, in drawImage
imgObj = pdfdoc.PDFImageXObject(name, image, mask=mask)
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/pdfbase/pdfdoc.py", line 2087, in __init__
self.loadImageFromA85(src)
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/pdfbase/pdfdoc.py", line 2095, in loadImageFromA85
imagedata = pdfutils.makeA85Image(source,IMG=IMG,detectJpeg=True)
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/pdfbase/pdfutils.py", line 38, in makeA85Image
raw = img.getRGBData()
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/lib/utils.py", line 902, in getRGBData
annotateException('\nidentity=%s'%self.identity())
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/lib/utils.py", line 1406, in annotateException
rl_reraise(t,v,b)
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/lib/utils.py", line 886, in getRGBData
if Image.VERSION.startswith('1.1.7'): im.load()
AttributeError: 'module' object has no attribute 'VERSION'
identity=[ImageReader@0x7f5eb9f90790 filename='KEGG/map03070.png']
======================================================================
ERROR: test_render_KGML_modify (test_KGML_graphics.KGMLPathwayTest)
Rendering of KGML to PDF, with modification.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/biopython/biopython/Tests/test_KGML_graphics.py", line 146, in test_render_KGML_modify
kgml_map.draw(p[1].output_stem + '_colors.pdf')
File "/home/travis/build/biopython/biopython/build/lib.linux-x86_64-2.7/Bio/Graphics/KGML_vis.py", line 158, in draw
self.drawing.drawImage(imfilename, 0, 0)
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/pdfgen/canvas.py", line 947, in drawImage
imgObj = pdfdoc.PDFImageXObject(name, image, mask=mask)
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/pdfbase/pdfdoc.py", line 2087, in __init__
self.loadImageFromA85(src)
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/pdfbase/pdfdoc.py", line 2095, in loadImageFromA85
imagedata = pdfutils.makeA85Image(source,IMG=IMG,detectJpeg=True)
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/pdfbase/pdfutils.py", line 38, in makeA85Image
raw = img.getRGBData()
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/lib/utils.py", line 902, in getRGBData
annotateException('\nidentity=%s'%self.identity())
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/lib/utils.py", line 1406, in annotateException
rl_reraise(t,v,b)
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/lib/utils.py", line 886, in getRGBData
if Image.VERSION.startswith('1.1.7'): im.load()
AttributeError: 'module' object has no attribute 'VERSION'
identity=[ImageReader@0x7f5eb97fe4d0 filename='KEGG/map03070.png']
======================================================================
ERROR: test_render_KGML_transparency (test_KGML_graphics.KGMLPathwayTest)
Rendering of KGML to PDF, with color alpha channel.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/biopython/biopython/Tests/test_KGML_graphics.py", line 182, in test_render_KGML_transparency
kgml_map.draw(p[1].output_stem + '_transparency.pdf')
File "/home/travis/build/biopython/biopython/build/lib.linux-x86_64-2.7/Bio/Graphics/KGML_vis.py", line 158, in draw
self.drawing.drawImage(imfilename, 0, 0)
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/pdfgen/canvas.py", line 947, in drawImage
imgObj = pdfdoc.PDFImageXObject(name, image, mask=mask)
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/pdfbase/pdfdoc.py", line 2087, in __init__
self.loadImageFromA85(src)
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/pdfbase/pdfdoc.py", line 2095, in loadImageFromA85
imagedata = pdfutils.makeA85Image(source,IMG=IMG,detectJpeg=True)
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/pdfbase/pdfutils.py", line 38, in makeA85Image
raw = img.getRGBData()
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/lib/utils.py", line 902, in getRGBData
annotateException('\nidentity=%s'%self.identity())
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/lib/utils.py", line 1406, in annotateException
rl_reraise(t,v,b)
File "/home/travis/build/biopython/biopython/.tox/py27-cover/lib/python2.7/site-packages/reportlab/lib/utils.py", line 886, in getRGBData
if Image.VERSION.startswith('1.1.7'): im.load()
AttributeError: 'module' object has no attribute 'VERSION'
identity=[ImageReader@0x7f5eb9fb7250 filename='KEGG/map03070.png']
----------------------------------------------------------------------
Activity
peterjc commentedon Apr 2, 2019
This looks like a bug in reportlab, but needs some investigation to work out which version(s) are affected, report the problem to ReportLab if not known already, and then most likely tweak the versions we install via:
https://github.com/biopython/biopython/blob/master/.travis-tox.ini
rtf-const commentedon Apr 4, 2019
There is already opened issue in ReportLab
https://bitbucket.org/rptlab/reportlab/issues/176/incompatibility-with-pillow-600
It is related with a version of Pillow, not the ReportLab itself
peterjc commentedon Apr 4, 2019
Thank you - that does explain this problem. As a short term fix, we can probably install Pillow < 6.0.0 explicitly.
Narendra186 commentedon Apr 13, 2019
Hush! You guys really helped me a lot, thank u
peterjc commentedon Apr 15, 2019
Closing. Our workaround for TravisCI of installing Pillow 5.4 is working nicely, but the underlying bug in ReportLab has yet to be solved:
https://bitbucket.org/rptlab/reportlab/issues/176/incompatibility-with-pillow-600
peterjc commentedon Apr 17, 2019
Now affecting AppVeyor, e.g.
https://ci.appveyor.com/project/biopython/biopython/builds/23911966/job/5v6n3icfmnqot76w
Workaround for ReportLab bug with Pillow v6.0
Workaround for ReportLab bug with Pillow v6.0 (#2013)
peterjc commentedon Apr 17, 2019
Closed for AppVeyor via #2013
Workaround for ReportLab bug with Pillow v6.0 (biopython#2013)
LWFlouisa commentedon Mar 10, 2020
It's causing the same issue in Linux Mint 19.1 I can't seem to open my cinnimon settings.
I also can't seem to use wget.
peterjc commentedon Mar 10, 2020
If wget isn't working there is probably something else wrong with your system, sadly.
Forcing pillow==5.4.1 rather than using pillow version 6 seemed to work for us.
As far as I know, the problem in ReportLab has not been fixed - or if it has, the bug was not closed.
LWFlouisa commentedon Mar 10, 2020
It worked, thanks a bunch!
peterjc commentedon Mar 12, 2020
ReportLab no longer use BitBucket, the old issue tracker mentioned earlier has been turned off. Quoting Robin Becker on the ReportLab mailing list:
That is the latest release on PyPI at the time of writing.