[Zope3-Users] error headache: __init__() takes exactly 1 argument (3 given)

Jachin Rupe jachin at voltzsoftware.com
Thu Apr 27 15:08:33 EDT 2006


hi there

I've got an error I've been stuck on for several hours now and I know  
the problem has got to be a very simple one but the error message I'm  
getting is not helping.  I'm just trying to create a view for a very  
simple object.  Here's the error I'm getting:

2006-04-27T13:58:09 ERROR SiteError http://localhost:8080/VinePackage/ 
@@details.html
Traceback (most recent call last):
   File "/usr/local/Zope-3.2.1/lib/python/zope/publisher/publish.py",  
line 135, in publish
     object = request.traverse(object)
   File "/usr/local/Zope-3.2.1/lib/python/zope/publisher/browser.py",  
line 500, in traverse
     ob = super(BrowserRequest, self).traverse(object)
   File "/usr/local/Zope-3.2.1/lib/python/zope/publisher/http.py",  
line 451, in traverse
     ob = super(HTTPRequest, self).traverse(object)
   File "/usr/local/Zope-3.2.1/lib/python/zope/publisher/base.py",  
line 289, in traverse
     subobject = publication.traverseName(
   File "/usr/local/Zope-3.2.1/lib/python/zope/app/publication/ 
publicationtraverse.py", line 46, in traverseName
     ob2 = namespaceLookup(ns, nm, ob, request)
   File "/usr/local/Zope-3.2.1/lib/python/zope/app/traversing/ 
namespace.py", line 121, in namespaceLookup
     return traverser.traverse(name, ())
   File "/usr/local/Zope-3.2.1/lib/python/zope/app/traversing/ 
namespace.py", line 363, in traverse
     name=name)
   File "/usr/local/Zope-3.2.1/lib/python/zope/component/ 
__init__.py", line 165, in queryMultiAdapter
     return sitemanager.queryMultiAdapter(objects, interface, name,  
default)
   File "/usr/local/Zope-3.2.1/lib/python/zope/component/site.py",  
line 75, in queryMultiAdapter
     default)
   File "/usr/local/Zope-3.2.1/lib/python/zope/interface/adapter.py",  
line 475, in queryMultiAdapter
     return factory(*objects)
TypeError: __init__() takes exactly 1 argument (3 given)

None of code I have written is in that trace so I have no idea where  
the problem is.  Everything else I try to do with the object I'm  
trying to create a new view for works so I'm assuming the problem is  
in the ZCML for the view:

<page
	name="details.html"
	for="vine.interfaces.IVinePackage"
	class="vine.vinePackage.VinePackage"
	template="vinePackage.pt"
	permission="zope.Public"
	menu="zmi_views"
	title="Preview"
/>

The only other file I can think of that might be the cause of the  
problem is vinePackage.pt   I took out all of the parts that refer to  
the Content Object in case the problem was there so I removed stuff  
until it was just a static html page and I was still getting the  
error.  As far as I can tell I'm following the message board example  
in the Zope book pretty closely.  If anyone has any suggestions on  
where I should look for the problem I would really appreciate it.

thanks

-jachin


More information about the Zope3-users mailing list