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> Fortunately, this is not a general problem! I use lots of "here.APythonScript()" that work perfectly.
The code, you show us, should not affect compilation at all as the "tal:replace" attributes are not evaluated during compilation...
Interestingly, after restarting the server the problem went away. I left work and turned off the computer with a troubled mind and the next morning the error was gone! I just left it at that. Obviously this was irrational and caused by some bug somewhere (most likely caused by the complexity of my site in some strange way). Now it works and I have not seen it since. Unfortunatly I don't have time enough on my project to look into it. Thank you for your help, Peter