[Zope] unbound method error with ZPT

Peter Bengtsson mail@peterbe.com
Mon, 25 Feb 2002 21:35:06 +0100


Everything used to work fine but now I get a weird error message in my METAL macros Page Template.

<!-- Page Template Diagnostics
 Compilation failed
 exceptions.TypeError: unbound method must be called with class instance 1st argument
-->

No line number, so I started removing things until I came to an odd conclusion.
That this does NOT work:

<html metal:define-macro="standard">
<br tal:replace="python:here.APythonScript()" />
</html>

BUT, this works:
<html metal:define-macro="standard">
<br tal:replace="here/APythonScript"/>
</html>



Zope 2.3.2, python 1.5.2, win98
TAL, PageTemplates 1.4.(latest)

I have searched the mailinglist but found no solution. It was working before until the site got complicated. I suppose I should be more specific about the whole problem but I was hoping for a quick answer. 
Has anybody come across this; and solved it??

Cheers, Peter