[reportlab-users] Hey, it's me again !

Jerome Alet reportlab-users@reportlab.com
Sun, 20 Oct 2002 11:09:27 +0200


On Fri, Oct 18, 2002 at 05:28:31PM +0100, Robin Becker wrote:
> >
> >BTW did you test it with 1.5.2 too ?
> >
> >Jerome Alet
> ....Jerome I tested the patched version on 1.5.2 (win32 version) and get
> an error in test_pdfgen_pycanvas.py after some debugging I find that we
> seem to be passing an Action instead of a string into string.lower
> 
> this happens at line 559 of pdfbase/pdfmetrics.py. The actual error
> message is 
> 
> TypeError: read-only character buffer, instance

That's why I added an __str__ method to PDFAction, because 2.1 produced
the same problem in line 568 : faceName = str(faceName)

It seems that 1.5.2 needs something too.

If your line number is correct, then try to add :

        fname = str(font.fontName)
        
above line 556
and then use fname instead of font.fontName in the registerFont method.

it should work.

hth

Jerome Alet