Personal tools
You are here: Home Documentation Error References TypeError: unsubscriptable object
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

TypeError: unsubscriptable object

This Error Reference applies to: Any version.
This Error Reference is intended for: Any audience.

"Type Error: unsubscriptable object" occurs in an Archetypes based object after pressing the save button of the base_edit form.

The above error occurs in Archetypes and rely on a bad naming of a field in the schema of the archetypes based class.

For example it results in this error:

  • if the name contains spaces, special characters, etc.,
  • if the name is a reserved word (like roles, portal, ...)
  • other naming-conflicts.
by Jens W. Klein last modified November 6, 2004 - 12:54 All content is copyright Plone Foundation and the individual contributors.

other explanation

Posted by Sven Deichmann at June 19, 2007 - 12:28
This might also be a tuple "()" in your code while you think it's a list "[ ]". A simple colon might cause such things:
variable = self.getMightyList(), (where getMightyList() returns a list) already returns a tuple.

Applies to duplicates as well

Posted by Max Bloechle at March 7, 2008 - 21:40
Happened to me with an archetypes based product (PloneFormGen) in which a copy of a folder (Fieldset Folder) created duplicate objects within. Sending the form resulted in a "TypeError: unsubscriptable object". Renaming the duplicate objects to different, unique ids solved the problem for me.
Looking back at the issue makes it look silly... It's always the same :)

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