function attributes not accessible in restricted mode
This Error Reference applies to:
Any version.
This Error Reference is intended for:
Any audience.
The error function attributes not accessible in restricted mode usually means that you're missing a set of parenthesis, and so are accessing a function itself instead of the result of calling the function.
For example:
def foo():
return 'hi'
If you write foo.title(), hoping to call the title attribute on a string (the result of calling foo), you will get this error, because you're trying to attached a title attribute to the function foo. The proper thing to write is foo().title().
Common places you'll make this mistake are in things like PageTemplates, DTML, and PythonScripts:
<dtml-var "foo.title()"> --> <dtml-var "foo().title()"> tal:content="python:foo.title()" --> tal:content="python:foo().title()"