Personal tools
You are here: Home Documentation Error References function attributes not accessible in restricted mode
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

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" means you're operating on a function when you think you're operating on the result of calling that function.

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()"

by Bill Fenner last modified October 6, 2005 - 19:20
Contributors: Bill Fenner, Joel Burton
All content is copyright Plone Foundation and the individual contributors.

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by