[reportlab-users] python renderPM.py fails with font errors

Gregory Tappero coulix at gmail.com
Wed Jan 26 16:28:52 EST 2011

Hello reportlab users,

Since I installed ubuntu 10.04 on a brand new computer and tried to
deploy my python project using reportlab a new kind of error arose:

RenderPMError: Can't setFont(ARIAL) missing the T1 files?
Originally <type 'exceptions.AttributeError'>: TTEncoding instance has
no attribute 'vector'

After some digging I read in the doc that I should run renderPM.test
to see if everyting was ok:

> sudo python renderPM.py

Warn: Can't find .pfb for face 'Times-Roman'
Traceback (most recent call last):
File "renderPM.py", line 723, in <module>
File "renderPM.py", line 703, in test
File "renderPM.py", line 651, in drawToFile
c = drawToPMCanvas(d, dpi=dpi, bg=bg, configPIL=configPIL,
File "renderPM.py", line 637, in drawToPMCanvas
draw(d, c, 0, 0, showBoundary=showBoundary)
File "renderPM.py", line 50, in draw
R.draw(renderScaledDrawing(drawing), canvas, x, y,
File "/usr/lib/python2.6/dist-packages/reportlab/graphics/renderbase.py",
line 197, in draw
self.initState(x,y) #this is the push()
File "renderPM.py", line 93, in initState
File "renderPM.py", line 87, in applyState
self._canvas.setFont(s['fontName'], s['fontSize'])
File "renderPM.py", line 368, in setFont
File "renderPM.py", line 221, in _setFont
raise RenderPMError, "Can't setFont(%s) missing the T1
files?\nOriginally %s: %s" % (fontName,s1,s2)
__main__.RenderPMError: Can't setFont(Times-Roman) missing the T1 files?
Originally <type 'exceptions.TypeError'>: makeT1Font() argument 2 must
be string, not None

I could use ttf fonts without troubles before that.

Any ideas on what could be wrong ?
Thank you for your help.

Greg Tappero
CTO co founder Edoboard
+33 0645764425

More information about the reportlab-users mailing list