[Zope3-Users] Zope3 Developers Handbook

Stuart Nettleton stuart.nettleton at optusnet.com.au
Mon Feb 13 23:28:05 EST 2006


Hi Stephan and baldtrol,

I have been working through Stephan's "Zope3 Developers Handbook" and find I
cannot create messages after the Workflow is installed.  My version of Zope
is 3.2 (final) on Windows XP.  Using the debug skin, the error is:

    http://localhost:8080/++skin++Debug/snboard/+/AddMessage.html%3D

    Error type: exceptions.AttributeError | Error object: 'LocalSiteManager'
object has no attribute 'getUtility'

My Traceback is provided below.

I found that baldtrol addressed the same error on the IRC on 21-09-2005 and
suggested a partial fix at
<http://www.zope.org/Members/baldtrol/workflowupdates/file_view>
http://www.zope.org/Members/baldtrol/workflowupdates/file_view

However, baltrol's partial fix seems to create yet a different error:

    Error Type: Exceptions.AttributeError | Error object: 'object' object
has no attribute 'getProcessDefinitionNamesForObject'

Can you please tell me if this Workflow problem has been addressed?

Many thanks,

Stuart

Here is the Error Traceback

      File "C:\Python24\Lib\site-packages\zope\publisher\publish.py", line
138, in publish

    result = publication.callObject(request, object)

      File
"C:\Python24\Lib\site-packages\zope\app\publication\zopepublication.py",
line 161, in callObject

    return mapply(ob, request.getPositionalArguments(), request)

      File "C:\Python24\Lib\site-packages\zope\publisher\publish.py", line
113, in mapply

    return debug_call(object, args)

      File "C:\Python24\Lib\site-packages\zope\publisher\publish.py", line
119, in debug_call

    return object(*args)

      File
"C:\Python24\Lib\site-packages\zope\app\pagetemplate\simpleviewclass.py",
line 44, in __call__

    return self.index(*args, **kw)

      File
"C:\Python24\Lib\site-packages\zope\app\pagetemplate\viewpagetemplatefile.py
", line 83, in __call__

    return self.im_func(im_self, *args, **kw)

      File
"C:\Python24\Lib\site-packages\zope\app\pagetemplate\viewpagetemplatefile.py
", line 51, in __call__

    sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),

      File
"C:\Python24\Lib\site-packages\zope\pagetemplate\pagetemplate.py", line 117,
in pt_render

    strictinsert=0, sourceAnnotations=sourceAnnotations)()

      File "C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py", line
277, in __call__

    self.interpret(self.program)

      File "C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py", line
352, in interpret

    handlers[opcode](self, args)

      File "C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py", line
908, in do_useMacro

    self.interpret(macro)

      File "C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py", line
352, in interpret

    handlers[opcode](self, args)

      File "C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py", line
538, in do_optTag_tal

    self.do_optTag(stuff)

      File "C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py", line
523, in do_optTag

    return self.no_tag(start, program)

      File "C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py", line
518, in no_tag

    self.interpret(program)

      File "C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py", line
352, in interpret

    handlers[opcode](self, args)

      File "C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py", line
878, in do_defineMacro

    self.interpret(macro)

      File "C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py", line
352, in interpret

    handlers[opcode](self, args)

      File "C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py", line
976, in do_defineSlot

    self.interpret(block)

      File "C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py", line
352, in interpret

    handlers[opcode](self, args)

      File "C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py", line
966, in do_defineSlot

    self.interpret(slot)

      File "C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py", line
352, in interpret

    handlers[opcode](self, args)

      File "C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py", line
878, in do_defineMacro

    self.interpret(macro)

      File "C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py", line
352, in interpret

    handlers[opcode](self, args)

      File "C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py", line
878, in do_defineMacro

    self.interpret(macro)

      File "C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py", line
352, in interpret

    handlers[opcode](self, args)

      File "C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py", line
588, in do_setLocal_tal

    self.engine.setLocal(name, self.engine.evaluateValue(expr))

      File "C:\Python24\Lib\site-packages\zope\tales\tales.py", line 696, in
evaluate

    return expression(self)

      File "C:\Python24\Lib\site-packages\zope\tales\expressions.py", line
205, in __call__

    return self._eval(econtext)

      File "C:\Python24\Lib\site-packages\zope\tales\expressions.py", line
199, in _eval

    return ob()

      File "C:\Python24\Lib\site-packages\zope\app\form\browser\add.py",
line 62, in update

    self.createAndAdd(data)

      File "C:\Python24\Lib\site-packages\zope\app\form\browser\add.py",
line 110, in createAndAdd

    notify(ObjectCreatedEvent(content))

      File "C:\Python24\Lib\site-packages\zope\event\__init__.py", line 23,
in notify

    subscriber(event)

      File "C:\Python24\Lib\site-packages\zope\app\event\dispatching.py",
line 66, in dispatch

    for ignored in subscribers(event, None):

      File "C:\Python24\Lib\site-packages\zope\component\__init__.py", line
181, in subscribers

    return sitemanager.subscribers(objects, interface)

      File "C:\Python24\Lib\site-packages\zope\component\site.py", line 89,
in subscribers

    return self.adapters.subscribers(required, provided)

      File "C:\Python24\Lib\site-packages\zope\interface\adapter.py", line
481, in subscribers

    subscribers = [subscription(*objects)

      File "C:\Python24\Lib\site-packages\zope\app\event\objectevent.py",
line 192, in objectEventNotify

    adapters = subscribers((event.object, event), None)

      File "C:\Python24\Lib\site-packages\zope\component\__init__.py", line
181, in subscribers

    return sitemanager.subscribers(objects, interface)

      File "C:\Python24\Lib\site-packages\zope\component\site.py", line 89,
in subscribers

    return self.adapters.subscribers(required, provided)

      File "C:\Python24\Lib\site-packages\zope\interface\adapter.py", line
481, in subscribers

    subscribers = [subscription(*objects)

      File
"C:\Python24\Lib\site-packages\zope\app\workflow\stateful\contentworkflow.py
", line 53, in NewObjectProcessInstanceCreator

    pi = createProcessInstance(cwf, pd_name)

      File "C:\Python24\Lib\site-packages\zope\app\workflow\instance.py",
line 57, in createProcessInstance

    pd = utils.getUtility(IProcessDefinition, name)

      File "C:\Python24\Lib\site-packages\zope\component\bbb\utility.py",
line 47, in __getattr__

    attr = getattr(self.sm, name)

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope3-users/attachments/20060214/265a0612/attachment-0001.htm


More information about the Zope3-users mailing list