[Zope3-Users] ComponentLookupError

2009-05-17 Thread Tim Cook
I'm getting this traceback:
==
serving on http://127.0.0.1:8080
2009-05-17 11:56:42,332 ERROR [SiteError] http://localhost:8080
Traceback (most recent call last):
  File
/home/tim/.buildout/eggs/zope.publisher-3.7.0-py2.5.egg/zope/publisher/publish.py,
 line 127, in publish
publication.beforeTraversal(request)
  File
/home/tim/.buildout/eggs/zope.app.publication-3.5.3-py2.5.egg/zope/app/publication/zopepublication.py,
 line 85, in beforeTraversal
principal = auth.authenticate(request)
  File
/home/tim/.buildout/eggs/zope.principalregistry-3.7.0-py2.5.egg/zope/principalregistry/principalregistry.py,
 line 58, in authenticate
if p.validate(password):
  File
/home/tim/.buildout/eggs/zope.principalregistry-3.7.0-py2.5.egg/zope/principalregistry/principalregistry.py,
 line 190, in validate
pwManager = self.__getPasswordManager()
  File
/home/tim/.buildout/eggs/zope.principalregistry-3.7.0-py2.5.egg/zope/principalregistry/principalregistry.py,
 line 184, in __getPasswordManager
return getUtility(IPasswordManager, self.__pwManagerName)
  File
/home/tim/.buildout/eggs/zope.component-3.6.0-py2.5.egg/zope/component/_api.py,
 line 171, in getUtility
raise ComponentLookupError(interface, name)
ComponentLookupError: (InterfaceClass
zope.password.interfaces.IPasswordManager, u'SHA1')


Though everything seems to me to be okay.  This was originally a
grokproject based application and uses grok 1.0a3 but I have been
incrementally/painfully changing the versions of components to get it to
run with ZODB3.9.0b1  

The server starts but when I try to access http://localhost:8080 I get
the above error.

The principal in site.zcml looks like this:

  principal id=zope.manager
 title=Manager
 login=admin

password=17e15cddd033e22ae348aeb5660fc2140aec35850c4da997
 description=OSHIP Developer
 password_manager=SHA1
 /


Any ideas where to start on this?

Thanks,
Tim








-- 
Timothy Cook, MSc
Health Informatics Research  Development Services
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook 
Skype ID == timothy.cook 
**
*You may get my Public GPG key from  popular keyservers or   *
*from this link http://timothywayne.cook.googlepages.com/home*
**


signature.asc
Description: This is a digitally signed message part
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] ComponentLookupError

2007-01-08 Thread Stephan Richter
On Wednesday 13 December 2006 15:40, David Johnson wrote:
 ComponentLookupError: ((decimalwidget.widget.Decimal object at  
 0x4203972c, zope.publisher.browser.BrowserRequest instance  
 URL=http://192.168.81.89:8090/CRM/Vanderbilt/@@+/action.html),  
 InterfaceClass zope.app.form.interfaces.IInputWidget, u'')

There does not seem to be an input widget for decimal yet. Please report this 
as a bug or missing feature.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] ComponentLookupError

2006-12-14 Thread FB
Hi,

On Wed, Dec 13, 2006 at 09:40:51PM +0100, David Johnson wrote:
 I'm very confused by the following error. Whenever I add certain content 
 components I get the 
 following error when add form is generated (I'm using standard addform).
 
 ComponentLookupError: ((decimalwidget.widget.Decimal object at 0x4203972c, 
 zope.publisher.browser.BrowserRequest instance 
 URL=http://192.168.81.89:8090/CRM/Vanderbilt/@@+/action.html), 
 InterfaceClass 
 zope.app.form.interfaces.IInputWidget, u'')
 
 I am not sure where to go with this.  I have three different instances of 
 Zope and two 
 generate this error and one does not.  The object listed in the error is not 
 the same between 
 content types, although it is consistent within a content type.

AFAIK the data type Decimal was included into zope some months ago. Maybe
two of your zope instances are outdated.

Regards,

Frank
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] ComponentLookupError

2006-12-13 Thread David Johnson
I'm very confused by the following error. Whenever I add certain content  
components I get the following error when add form is generated (I'm using  
standard addform).


ComponentLookupError: ((decimalwidget.widget.Decimal object at  
0x4203972c, zope.publisher.browser.BrowserRequest instance  
URL=http://192.168.81.89:8090/CRM/Vanderbilt/@@+/action.html),  
InterfaceClass zope.app.form.interfaces.IInputWidget, u'')


I am not sure where to go with this.  I have three different instances of  
Zope and two generate this error and one does not.  The object listed in  
the error is not the same between content types, although it is consistent  
within a content type.



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] ComponentLookupError

2006-06-01 Thread Stephan Richter
On Monday 15 May 2006 18:39, Jachin Rupe wrote:
 TypeError: ('Could not adapt', simple_abook.person.Person object at  
 0x3b3a6f0, InterfaceClass simple_abook.interfaces.IPerson)

 I think this is saying that it can't adapt my Person object to the  
 IPerson interface.

 Am I still missing something?

No, your code looks good. I do not see, why Person cannot adapt IPerson; btw, 
if an object implements an interface it is always adaptable to this 
interface; it simply returns itself.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] ComponentLookupError

2006-05-15 Thread Jachin Rupe

hi there

thanks for the help... but I have a new problem.  Now the addForm  
show up but if I try to actually add a person I get the following error:


2006-05-15T17:19:42 ERROR SiteError http://localhost:8080/+/ 
AddPerson.html%3D

Traceback (most recent call last):
  File /usr/local/Zope-3.2.1/lib/python/zope/publisher/publish.py,  
line 138, in publish

result = publication.callObject(request, object)
  File /usr/local/Zope-3.2.1/lib/python/zope/app/publication/ 
zopepublication.py, line 161, in callObject

return mapply(ob, request.getPositionalArguments(), request)
  File /usr/local/Zope-3.2.1/lib/python/zope/publisher/publish.py,  
line 113, in mapply

return debug_call(object, args)
  File /usr/local/Zope-3.2.1/lib/python/zope/publisher/publish.py,  
line 119, in debug_call

return object(*args)
  File /usr/local/Zope-3.2.1/lib/python/zope/app/pagetemplate/ 
simpleviewclass.py, line 44, in __call__

return self.index(*args, **kw)
  File /usr/local/Zope-3.2.1/lib/python/zope/app/pagetemplate/ 
viewpagetemplatefile.py, line 83, in __call__

return self.im_func(im_self, *args, **kw)
  File /usr/local/Zope-3.2.1/lib/python/zope/app/pagetemplate/ 
viewpagetemplatefile.py, line 51, in __call__

sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
  File /usr/local/Zope-3.2.1/lib/python/zope/pagetemplate/ 
pagetemplate.py, line 117, in pt_render

strictinsert=0, sourceAnnotations=sourceAnnotations)()
  File /usr/local/Zope-3.2.1/lib/python/zope/tal/ 
talinterpreter.py, line 277, in __call__

self.interpret(self.program)
  File /usr/local/Zope-3.2.1/lib/python/zope/tal/ 
talinterpreter.py, line 352, in interpret

handlers[opcode](self, args)
  File /usr/local/Zope-3.2.1/lib/python/zope/tal/ 
talinterpreter.py, line 908, in do_useMacro

self.interpret(macro)
  File /usr/local/Zope-3.2.1/lib/python/zope/tal/ 
talinterpreter.py, line 352, in interpret

handlers[opcode](self, args)
  File /usr/local/Zope-3.2.1/lib/python/zope/tal/ 
talinterpreter.py, line 538, in do_optTag_tal

self.do_optTag(stuff)
  File /usr/local/Zope-3.2.1/lib/python/zope/tal/ 
talinterpreter.py, line 523, in do_optTag

return self.no_tag(start, program)
  File /usr/local/Zope-3.2.1/lib/python/zope/tal/ 
talinterpreter.py, line 518, in no_tag

self.interpret(program)
  File /usr/local/Zope-3.2.1/lib/python/zope/tal/ 
talinterpreter.py, line 352, in interpret

handlers[opcode](self, args)
  File /usr/local/Zope-3.2.1/lib/python/zope/tal/ 
talinterpreter.py, line 878, in do_defineMacro

self.interpret(macro)
  File /usr/local/Zope-3.2.1/lib/python/zope/tal/ 
talinterpreter.py, line 352, in interpret

handlers[opcode](self, args)
  File /usr/local/Zope-3.2.1/lib/python/zope/tal/ 
talinterpreter.py, line 976, in do_defineSlot

self.interpret(block)
  File /usr/local/Zope-3.2.1/lib/python/zope/tal/ 
talinterpreter.py, line 352, in interpret

handlers[opcode](self, args)
  File /usr/local/Zope-3.2.1/lib/python/zope/tal/ 
talinterpreter.py, line 966, in do_defineSlot

self.interpret(slot)
  File /usr/local/Zope-3.2.1/lib/python/zope/tal/ 
talinterpreter.py, line 352, in interpret

handlers[opcode](self, args)
  File /usr/local/Zope-3.2.1/lib/python/zope/tal/ 
talinterpreter.py, line 878, in do_defineMacro

self.interpret(macro)
  File /usr/local/Zope-3.2.1/lib/python/zope/tal/ 
talinterpreter.py, line 352, in interpret

handlers[opcode](self, args)
  File /usr/local/Zope-3.2.1/lib/python/zope/tal/ 
talinterpreter.py, line 878, in do_defineMacro

self.interpret(macro)
  File /usr/local/Zope-3.2.1/lib/python/zope/tal/ 
talinterpreter.py, line 352, in interpret

handlers[opcode](self, args)
  File /usr/local/Zope-3.2.1/lib/python/zope/tal/ 
talinterpreter.py, line 588, in do_setLocal_tal

self.engine.setLocal(name, self.engine.evaluateValue(expr))
  File /usr/local/Zope-3.2.1/lib/python/zope/tales/tales.py, line  
696, in evaluate

return expression(self)
  File /usr/local/Zope-3.2.1/lib/python/zope/tales/expressions.py,  
line 205, in __call__

return self._eval(econtext)
  File /usr/local/Zope-3.2.1/lib/python/zope/tales/expressions.py,  
line 199, in _eval

return ob()
  File /usr/local/Zope-3.2.1/lib/python/zope/app/form/browser/ 
add.py, line 62, in update

self.createAndAdd(data)
  File /usr/local/Zope-3.2.1/lib/python/zope/app/form/browser/ 
add.py, line 115, in createAndAdd

adapted = self.schema(content)
  File /usr/local/Zope-3.2.1/lib/python/zope/interface/ 
interface.py, line 682, in __call__

raise TypeError(Could not adapt, obj, self)
TypeError: ('Could not adapt', simple_abook.person.Person object at  
0x3b3a6f0, InterfaceClass simple_abook.interfaces.IPerson)


I think this is saying that it can't adapt my Person object to the  
IPerson interface.


Am I still missing something?

Now for the sake of completeness here's the rest of the example so  
everyone can be on the same page:



Re: [Zope3-Users] ComponentLookupError

2006-05-12 Thread Egon Frerich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Jachin,

with these changes your application works:


(new)
-  browser.py 

from zope.app.form.browser.editview import EditView
from zope.app.form.browser.add import AddView
from zope.app.form import CustomWidgetFactory
from zope.app.form.browser import ObjectWidget

from interfaces import IPerson
from person import Person
from streetAddress import StreetAddress


st = CustomWidgetFactory(ObjectWidget, StreetAddress)

class PersonEditView(EditView):
__used_for__ = IPerson

address_widget = st

class PersonAddView(AddView):
__used_for__ = IPerson

address_widget = st

- - configure.zcml 

configure
xmlns=http://namespaces.zope.org/zope;
xmlns:browser=http://namespaces.zope.org/browser;
xmlns:i18n=http://namespaces.zope.org/i18n;
i18n_domain=abook

!-- Person --

interface
interface= .interfaces.IPerson
type= zope.app.content.interfaces.IContentType
/

content class = .person.Person
factory
id= simple_abook.person.Person
description= A Person
/
require
permission= zope.View
interface= .interfaces.IPerson
/
require
permission= zope.View
set_schema= .interfaces.IPerson
/
/content

content class = .streetAddress.StreetAddress
factory
id= simple_abook.person.StreetAddress
description= A Person
/
require
permission= zope.View
interface= .interfaces.IStreetAddress
/
require
permission= zope.View
set_schema= .interfaces.IStreetAddress
/
/content


browser:addform
label= Add a Person
fields= firstName lastName address
name= AddPerson.html
schema= .interfaces.IPerson
content_factory= .person.Person
class=.browser.PersonAddView
permission= zope.View
/

browser:editform
label= Edit a Person
schema= .interfaces.IPerson
for= .interfaces.IPerson
fields= firstName lastName address
name= edit.html
class=.browser.PersonEditView
permission= zope.View
menu= zmi_views
title= Edit
/

browser:addMenuItem
title= A Person
description= Add a Person
view= AddPerson.html
class= .person.Person
permission= zope.View
/

/configure
-  


Regards,

Egon


Jachin Rupe schrieb am 11.05.2006 21:12:

 hi there

 opps I forgot:

 streetAddress.py

 from persistent import Persistent
 from zope.interface import implements

 from abook.interfaces import IStreetAddress


 class StreetAddress(Persistent):

 implements(IStreetAddress)

 street = u
 city = u
 state = u
 zipcode = u



 On May 11, 2006, at 2:02 PM, Egon Frerich wrote:

 Hi Jachin,


 Jachin Rupe schrieb am 11.05.2006 19:12:

 interfaces.py

 from zope.interface import Interface
 import zope.schema

 class IStreetAddress(Interface):
 A vine street address

 street = zope.schema.Text (
 title=uStreet 1,
 description=uThe street address,
 required = False
 )

 city = zope.schema.TextLine (
 title=uCity,
 description=uThe city.,
 required = False
 )

 state = zope.schema.TextLine (
 title=uState,
 description=uThe state.,
 required = False
 )

 zipcode = zope.schema.TextLine (
 title=uZip Code,
 description=uThe zip code,
 required = False,
 min_length = 5
 )




 Can you please me your implementation for this?

 Egon

 --
 Egon Frerich, Freudenbergstr. 16, 28213 Bremen

 E-Mail: [EMAIL PROTECTED]

- --
Egon Frerich, Freudenbergstr. 16, 28213 Bremen

E-Mail: [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (MingW32)
Comment: GnuPT 2.7.2
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEZHSiuTzybIiyjvURAjtUAKCBUauLTFzO+soS/N8RWPO4N5SG8ACfalVY
jvkyaY1jfGjM9/I1g/5HbLE=
=Elf8
-END PGP SIGNATURE-
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] ComponentLookupError

2006-05-11 Thread Jachin Rupe

hi there

here's a smaller, hopefully more clearer example of a problem I have  
been stuck on.  I should probably also lead off by saying that I  
think what I am asking is basically this question.


http://www.mail-archive.com/zope3-users@zope.org/msg00052.html

However I have read objectwidget.txt( http://svn.zope.org/Zope3/trunk/ 
src/zope/app/form/browser/objectwidget.txt ) several times and I  
don't see where a custom widget gets created.  I also suspect that  
because the object I need to create a custom widget for has more  
than just one field I have to do something different.


If there's a short fix for the problem that would be great, otherwise  
a little explanation to point me in the right direction would be  
greatly appreciated too.


thanks.

-jachin

Here's the error I'm getting any my code:

2006-05-11T11:56:47 ERROR SiteError http://localhost:8080/@@+/ 
action.html

Traceback (most recent call last):
  File /usr/local/Zope-3.2.1/lib/python/zope/publisher/publish.py,  
line 138, in publish

result = publication.callObject(request, object)
  File /usr/local/Zope-3.2.1/lib/python/zope/app/publication/ 
zopepublication.py, line 161, in callObject

return mapply(ob, request.getPositionalArguments(), request)
  File /usr/local/Zope-3.2.1/lib/python/zope/publisher/publish.py,  
line 113, in mapply

return debug_call(object, args)
  File /usr/local/Zope-3.2.1/lib/python/zope/publisher/publish.py,  
line 119, in debug_call

return object(*args)
  File /usr/local/Zope-3.2.1/lib/python/zope/app/container/browser/ 
adding.py, line 128, in action

name=view_name) is not None:
  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)
  File /usr/local/Zope-3.2.1/lib/python/zope/app/form/browser/ 
editview.py, line 64, in __init__

self._setUpWidgets()
  File /usr/local/Zope-3.2.1/lib/python/zope/app/form/browser/ 
add.py, line 49, in _setUpWidgets
setUpWidgets(self, self.schema, IInputWidget,  
names=self.fieldNames)
  File /usr/local/Zope-3.2.1/lib/python/zope/app/form/utility.py,  
line 153, in setUpWidgets

context=context)
  File /usr/local/Zope-3.2.1/lib/python/zope/app/form/utility.py,  
line 97, in setUpWidget

widget = _createWidget(context, field, viewType, view.request)
  File /usr/local/Zope-3.2.1/lib/python/zope/app/form/utility.py,  
line 65, in _createWidget

return zapi.getMultiAdapter((field, request), viewType)
  File /usr/local/Zope-3.2.1/lib/python/zope/component/ 
__init__.py, line 154, in getMultiAdapter

raise ComponentLookupError(objects, interface, name)
ComponentLookupError: ((zope.schema._field.Object object at  
0x4282b70, zope.publisher.browser.BrowserRequest instance  
URL=http://localhost:8080/@@+/action.html), InterfaceClass  
zope.app.form.interfaces.IInputWidget, u'')
127.0.0.1 - - [11/May/2006:11:56:47 -0500] GET /@@+/action.html? 
type_name=AddPerson.html HTTP/1.1 500 84 http://localhost:8080/ 
@@contents.html Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en- 
US; rv:1.8.0.3) Gecko/20060427 Camino/1.0.1


interfaces.py

from zope.interface import Interface
import zope.schema

class IStreetAddress(Interface):
A vine street address

street = zope.schema.Text (
title=uStreet 1,
description=uThe street address,
required = False
)

city = zope.schema.TextLine (
title=uCity,
description=uThe city.,
required = False
)

state = zope.schema.TextLine (
title=uState,
description=uThe state.,
required = False
)

zipcode = zope.schema.TextLine (
title=uZip Code,
description=uThe zip code,
required = False,
min_length = 5
)


class IPerson(Interface):
firstName = zope.schema.TextLine (
title=uFirst Name,
description=uThe person's first name,
required=False
)

lastName = zope.schema.TextLine (
title=uLast Name,
description=uThe person's last name,
required=False
)

address = zope.schema.Object (
title=uAddress,
description=uThe person's adderess,
required=False,
schema = IStreetAddress
)


person.py

from persistent import Persistent
from zope.interface import implements

from 

Re: [Zope3-Users] ComponentLookupError

2006-05-11 Thread Jachin Rupe

hi there

opps I forgot:

streetAddress.py

from persistent import Persistent
from zope.interface import implements

from abook.interfaces import IStreetAddress


class StreetAddress(Persistent):

implements(IStreetAddress)

street = u
city = u
state = u
zipcode = u



On May 11, 2006, at 2:02 PM, Egon Frerich wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Jachin,


Jachin Rupe schrieb am 11.05.2006 19:12:


interfaces.py

from zope.interface import Interface
import zope.schema

class IStreetAddress(Interface):
A vine street address

street = zope.schema.Text (
title=uStreet 1,
description=uThe street address,
required = False
)

city = zope.schema.TextLine (
title=uCity,
description=uThe city.,
required = False
)

state = zope.schema.TextLine (
title=uState,
description=uThe state.,
required = False
)

zipcode = zope.schema.TextLine (
title=uZip Code,
description=uThe zip code,
required = False,
min_length = 5
)





Can you please me your implementation for this?

Egon

- --
Egon Frerich, Freudenbergstr. 16, 28213 Bremen

E-Mail: [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (MingW32)
Comment: GnuPT 2.7.2
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEY4pDuTzybIiyjvURAlPqAJ4tupOdpsCvIK7SBco58WJ7rQEpGwCfdl+u
poVz3T26Wfap0sRx8X0Ed7A=
=KQ3V
-END PGP SIGNATURE-


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users