Personal tools
You are here: Home Documentation Error References Class declaration fails and complains about number of arguments
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

Class declaration fails and complains about number of arguments

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

For example: class Record(BaseBTreeFolder): TypeError: function takes at most 2 arguments (3 given)

During the development of your Plone/Zope Python code you have encountered a mysterious error. For some reason, subclassing complains about number of arguments.

You have imported a module instead of a class

E.g.

from Products.PloneLocalFolderNG import PloneLocalFolderNG 
# imports PloneLocalFolderNG.py module

Correct is

from Products.PloneLocalFolderNG.PloneLocalFolderNG import PloneLocalFolderNG 
# imports PloneLocalFolderNG class from PloneLocalFolderNG.py module
by Mikko Ohtamaa last modified January 23, 2006 - 06:58
Contributors: Mikko Ohtamaa
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