Hi,

On 8/20/2014 16:22, Sibylle Koczian wrote:
Hello,

I'm using Gentoo which has Python 3 as default version but installs Python 2.7 as well. Those of my Dabo applications without reports run as expected, but when I try to start an application with reports I get this error message:

sib@gespenst-gentoo64 ~ $ scripts/bl/main.py
Traceback (most recent call last):
  File "scripts/bl/main.py", line 9, in <module>
    import ui
  File "/home/sib/scripts/bl/ui/__init__.py", line 17, in <module>
    from FussballPG import BasePage
  File "/home/sib/scripts/bl/ui/FussballPG.py", line 9, in <module>
    from dabo.dReportWriter import dReportWriter
File "/home/sib/src/dabo-master/dabo/dReportWriter.py", line 4, in <module>
    from dabo.lib.reportWriter import ReportWriter
File "/home/sib/src/dabo-master/dabo/lib/reportWriter.py", line 42, in <module>
    raise ImportError(msg)
ImportError:
The Dabo Report Writer has dependencies on libraries you
don't appear to have installed. You still need:

    Image

Image is the Python Imaging Library available from
http://www.pythonware.com/products/pil

reportlab is the ReportLab toolkit available from
http://www.reportlab.org

If you are on a Debian Linux system, just issue:
sudo apt-get install python-reportlab
sudo apt-get install python-imaging

Reportlab is installed, it doesn't need pil as long as I don't try to include images in my report. But trying to install pil doesn't work, because Gentoo by default installs the fork, pillow, into both Python versions. I suppose it's quite possible to change that, but it would be much simpler to do without. There are no images in my reports - just as reportlab itself can be installed without pil, can't Dabo use it without pil?

It might be easier to just allow for both PIL and Pillow.

Following is untested:

So line 17 in reportWriter.py:
for lib in ("reportlab", "Image"):

would be:
for lib in ("reportlab", "PIL"):

and change the actual import of it from:
import Image

to:
from PIL import Image

Werner
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to