Nov 5, 2009 3:44 PM
Unable to use dmd.ZenEventManager.manage_ackEvents() in a script or zendmd!
-
Like (0)
What's the symptom of failure?
--Ian
What version of Zenoss? That traceback doesn't appear to apply to 2.5 or trunk code.
--Ian
Here's a post referencing the same issue in 2.4.x:
http://www.mail-archive.com/zenoss-users@zenoss.org/msg28329.html
Yeah, it's a bug that was fixed in 2.5. Lemme see if I can scare up a changeset.
--Ian
I tried:
dmd.ZenEventManager.manage_setEventStates(1, 'a28303fd-8f3a-40fe-b763-eceac4c0803b')
Which should work, but it doesn't (I'm probably missing something that's being done in zenackevents.py).
Try adding this to your script:
from Products.Five import zcml
import Products
zcml.load_config('meta.zcml', Products.Five)
zcml.load_config('configure.zcml', Products.ZenWidgets)
I assume you're subclassing CmdBase in some way?
--Ian
When I do those imports I get:
Traceback (most recent call last):
File "./ticket_create_test.py", line 16, in ?
zcml.load_config('configure.zcml', Products.ZenWidgets)
File "/usr/local/zenoss/zenoss/Products/Five/zcml.py", line 50, in load_config
_context = xmlconfig.file(file, package, _context, execute=execute)
File "/usr/local/zenoss/zenoss/lib/python/zope/configuration/xmlconfig.py", line 441, in file
context.execute_actions()
File "/usr/local/zenoss/zenoss/lib/python/zope/configuration/config.py", line 585, in execute_actions
callable(*args, **kw)
File "/usr/local/zenoss/zenoss/lib/python/zope/app/component/metaconfigure.py", line 46, in handler
method=getattr(zapi.getGlobalService(serviceName), methodName)
File "/usr/local/zenoss/zenoss/lib/python/zope/component/__init__.py", line 52, in getGlobalService
return serviceManager.getService(name)
File "/usr/local/zenoss/zenoss/lib/python/zope/component/service.py", line 109, in getService
raise ComponentLookupError(name)
zope.configuration.config.ConfigurationExecutionError: zope.component.exceptions.ComponentLookupError: 'Presentation'
in:
File "/usr/local/zenoss/python/lib/python2.4/site-packages/zenoss.extjs-2.2.1-py2.4.egg/zenoss/extjs/configure.zcml", line 6.3-9.10
<browser:resourceDirectory
name="extjs"
directory="src"
/>
Okay, give this a shot: http://pastebin.com/m3e5bc361
The problem is that this code was rewritten quite a lot in 2.5, so it isn't a simple patch.
--Ian
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||