[reportlab-users] Beginner's preppy puzzle: call to templatemodule.get() raises AttributeError: 'module' object has no attribute 'get'

Boar Gules reportlab at boargules.com
Mon May 13 17:11:33 EDT 2013


Thanks.

I wasn't versioning files at that stage, but it's pretty clear there must
have been a syntax error in the def statement that caused it not to be
recognized. I see that doing it the other way, calling getOutput() on a
.prep file with a def statement gives a helpful error message.

Just the help I needed.

Regards

-----Original Message-----
From: Andy Robinson
Sent: Monday, May 13, 2013 10:16 AM
To: reportlab-users
Subject: Re: [reportlab-users] Beginner's preppy puzzle: call to
templatemodule.get() raises AttributeError: 'module' object has no attribute
'get'

The 'new' version has been in the code for many years. Which function
is available depends on the first line of the .prep file.

If you declare a module with {{def(arg1, arg2 etc)}} at the top, you
can only call it with get() not getOutput()



More information about the reportlab-users mailing list