[reportlab-users] Problem using FAQ example for embedding font

Gerry Reno greno at verizon.net
Mon Sep 15 21:37:02 EDT 2008


Gerry Reno wrote:

>

> File

> "/usr/lib/python2.5/site-packages/reportlab/pdfbase/pdfmetrics.py",

> line 599, in registerEncoding

> raise FontError('Encoding "%s" already registered with a different

> name vector!' % enc.name)

> FontError: Encoding "GnuMICREncoding" already registered with a

> different name vector!

>

Why this problem happens is because in a container (here TinyERP but
could be any) the container itself is initializing the module containing
the font registration code and then when the user does an update it
causes the initialization to run again which is rather normal. Maybe
another way of handling the issue would be that if the font is already
registered it should just ignore the subsequent attempts or replace the
existing registration with the new registration rather than throwing an
exception. Certainly this does not have to be a fatal error.

Regards,
Gerry



More information about the reportlab-users mailing list