[reportlab-users] renderPM 'module' object has no attribute
'saveToFile'
Genís Pujol
genis.pujol at mss.scc.com
Mon Jul 10 08:09:03 EDT 2006
Hello,
I've just installed reportlab and the PM plugin, but when I try to execute a sample script I found in the documentation, I get the following error:
< - - - Error message starts here - - - >
Traceback (most recent call last):
File "reportlab.test", line 7, in ?
renderPM.saveToFile(d, 'example1.png', 'PNG')
AttributeError: 'module' object has no attribute 'saveToFile'
< - - - end of error message - - - >
Other info:
Python 2.3.3
renderPM-1.01-20060710
ReportLab_1_21
< - - - - Python script begins here - - - - >
from reportlab.lib import colors
from reportlab.graphics.shapes import *
from reportlab.graphics import renderPM
d = Drawing(400, 200)
d.add(Rect(50, 50, 300, 100, fillColor=colors.yellow))
d.add(String(150,100, 'Hello World', fontSize=18, fillColor=colors.red))
renderPM.saveToFile(d, 'example1.png', 'PNG')
< - - - - End of script - - - - >
Any help will be appreciated,
Regards,
Genis.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://two.pairlist.net/pipermail/reportlab-users/attachments/20060710/2879fee0/attachment.html
More information about the reportlab-users
mailing list