[Grok-dev] getUtility() fails from IApplicationInitializedEvent function
Àlex Magaz Graça
rivaldi8 at gmail.com
Wed Dec 21 22:10:46 UTC 2011
I'm getting a ComponentLookupError when getUtility() is called in the
def setUpTestUsers(obj, event):
authPlugin = getUtility(IAuthenticatorPlugin, "users")
According to Grok documentation :
"This event can be used to trigger the creation of contents or other
tasks that require the application to be fully operational : utilities
installed and indexes created in the catalog."
I understand utilities should be ready. In fact, I have a print
statement in the utility's __init__() which is executed before
getUtility() fails. I've also checked the getUtility() call in the
function is the same that is used in other places and working just fine.
Any idea why this fails?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Grok-dev