[reportlab-users] error: no module named logger

Robin Becker reportlab-users@reportlab.com
Wed, 16 Jun 2004 08:33:51 +0100


Tim Roberts wrote:
> 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:
>> /usr/lib/python2.3/site-packages/reportlab/lib/logger.py
>>
>> 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.
> 
unfortunately it now seems that the encoding argument is coming back.

-- 
Robin Becker