GÜNGÖR BUDAK

Bioinformatics Analyst at Seven Bridges & PhD Student at METU

ImportError: Reportlab Version 2.1+ is needed!

Little bug in xhtml2pdf version 0.0.5. To fix:

$ sudo nano /usr/local/lib/python2.7/dist-packages/xhtml2pdf/util.py

Change the following lines:

if not (reportlab.Version[0] == "2" and reportlab.Version[2] >= "1"):
    raise ImportError("Reportlab Version 2.1+ is needed!")

REPORTLAB22 = (reportlab.Version[0] == "2" and reportlab.Version[2] >= "2")

With these lines:

if not (reportlab.Version[:3] >= "2.1"):
    raise ImportError("Reportlab Version 2.1+ is needed!")

REPORTLAB22 = (reportlab.Version[:3] >= "2.1")