[reportlab-users] error: no module named logger

Tim Roberts reportlab-users@reportlab.com
Tue, 15 Jun 2004 10:47:55 -0700

On Mon, 14 Jun 2004 11:00:24 -0500, Randall Smith <randall@tnr.cc> wrote:

>Here is an error message I got.
>   File "mypdf.py", line 145, in myFirstPage
>     print canvas.stringWidth(datestr, 'Courier', 12, encoding=0)
>   File "/usr/lib/python2.3/site-packages/reportlab/pdfgen/canvas.py", 
>line 1251, in stringWidth
>     import logger
>ImportError: No module named logger
>I looked and the module is here:
>Am I doing something wrong?

Looks to me like a ReportLab bug.  You can replace that line (line 1251 
in canvas.py) with this:

     from reportlab.lib import logger

However,  what it was trying to tell you is that the "encoding" argument 
is no longer meaningful.

- Tim Roberts, timr@probo.com
  Providenza & Boekelheide, Inc.