When I try to generate a PDF of an invoice, I receive this error:
"Reportlab Version 2.1+ is needed!"
I have Reportlab 3.0 installed.
I'm working in a clean virtualenv. This is my pip freeze:
Cartridge==0.9.2
Django==1.6.2
Mezzanine==3.0.9
PIL==1.1.7
Pillow==2.3.0
bleach==1.4
feedparser==5.1.3
filebrowser-safe==0.3.2
future==0.9.0
grappelli-safe==0.3.6
html5lib==1.0b3
oauthlib==0.6.1
pisa==3.0.33
pyPdf==1.13
pytz==2013.9
reportlab==3.0
requests==2.2.1
requests-oauthlib==0.4.0
six==1.5.2
sphinx-me==0.2.1
tzlocal==1.0
wsgiref==0.1.2
xhtml2pdf==0.0.5
REPORTLAB22 = (reportlab.Version[0] == "2" and reportlab.Version[2] >= "2")
This will fail as the reportlab version is now 3.0.
Just replace this code segment with the following:
if not (reportlab.Version[:3]>="2.1"):
raise ImportError("Reportlab Version 2.1+ is needed!")
REPORTLAB22 = (reportlab.Version[:3]>="2.1")
and reinstall xhtml2pdf. It will work.
You will need to uninstall xhtml2pdf first.
I am new to google groups and thus, pardon is I have not followed some norms.
Regards,
Animesh
| Exception Value: | invalid syntax (__init__.py, line 43) |
|---|---|
| Exception Location: | /home/tom/myvenv3/lib/python3.3/site-packages/ho/pisa/__init__.py in <module>, line 26 |
| Python Executable: | /home/tom/myvenv3/bin/python |
| Python Version: | 3.3.2 |