Feb 18, 2009 5:28 AM
development environment for zenoss
-
Like (0)
which is a good development environment for zenoss, do you use?
thanks
_______________________________________________
zenoss-dev mailing list
zenoss-dev@zenoss.org
http://lists.zenoss.org/mailman/listinfo/zenoss-dev
For what it is worth, I have an ubuntu linux workstation with the
eclipse ide and the pydev addon. It works great for me.
_______________________________________________
zenoss-dev mailing list
zenoss-dev@zenoss.org
http://lists.zenoss.org/mailman/listinfo/zenoss-dev
Dear All
Kindly communicate me the exact versions of
1) python
2) Zenoss
3) Eclipse IDE etc
When i compile simple python code then it executes. When i import the modules of Zenoss library then i get errors that you are using wrong API version etc.
i tried to compile the following code :
import locale
from Globals import DTMLFile
from Globals import InitializeClass
from Products.ZenUtils.Utils import convToUnits
from Products.ZenRelations.RelSchema import *
from Products.ZenModel.ZenossSecurity import ZEN_VIEW, ZEN_CHANGE_SETTINGS
from Products.ZenModel.DeviceComponent import DeviceComponent
from Products.ZenModel.ManagedEntity import ManagedEntity
from Products.ZenUtils.Utils import prepId
from ZenModelRM import ZenModelRM
currentVal = cacheRRDValue('toner_toner', default)
and got following issues :
/home/zenoss/zenoss/lib/python/ExtensionClass/__init__.py:105: RuntimeWarning: Python C API version mismatch for module _ExtensionClass: This Python has API version 1013, module _ExtensionClass has version 1012.
from _ExtensionClass import *
/home/zenoss/zenoss/lib/python/Acquisition/__init__.py:1: RuntimeWarning: Python C API version mismatch for module _Acquisition: This Python has API version 1013, module _Acquisition has version 1012.
from _Acquisition import *
/home/zenoss/zenoss/lib/python/ComputedAttribute/__init__.py:1: RuntimeWarning: Python C API version mismatch for module _ComputedAttribute: This Python has API version 1013, module _ComputedAttribute has version 1012.
from _ComputedAttribute import *
/home/zenoss/zenoss/lib/python/persistent/__init__.py:19: RuntimeWarning: Python C API version mismatch for module cPersistence: This Python has API version 1013, module cPersistence has version 1012.
from cPersistence import Persistent, GHOST, UPTODATE, CHANGED, STICKY
/home/zenoss/zenoss/lib/python/persistent/__init__.py:19: RuntimeWarning: Python C API version mismatch for module TimeStamp: This Python has API version 1013, module TimeStamp has version 1012.
from cPersistence import Persistent, GHOST, UPTODATE, CHANGED, STICKY
/home/zenoss/zenoss/lib/python/persistent/__init__.py:20: RuntimeWarning: Python C API version mismatch for module cPickleCache: This Python has API version 1013, module cPickleCache has version 1012.
from cPickleCache import PickleCache
/home/zenoss/zenoss/lib/python/zope/interface/interface.py:156: RuntimeWarning: Python C API version mismatch for module _zope_interface_coptimizations: This Python has API version 1013, module _zope_interface_coptimizations has version 1012.
from _zope_interface_coptimizations import SpecificationBase
/home/zenoss/zenoss/lib/python/AccessControl/ImplC.py:18: RuntimeWarning: Python C API version mismatch for module cAccessControl: This Python has API version 1013, module cAccessControl has version 1012.
from cAccessControl import rolesForPermissionOn, \
/home/zenoss/zenoss/lib/python/Record/__init__.py:59: RuntimeWarning: Python C API version mismatch for module _Record: This Python has API version 1013, module _Record has version 1012.
from _Record import Record
Traceback (most recent call last):
File "/home/arahman/workspace/ASW/src/co.py", line 5, in <module>
from Globals import DTMLFile
File "/home/zenoss/zenoss/lib/python/Globals.py", line 23, in <module>
import Acquisition, ComputedAttribute, App.PersistentExtra, os
File "/home/zenoss/zenoss/lib/python/App/PersistentExtra.py", line 16, in <module>
from class_init import default__class_init__
File "/home/zenoss/zenoss/lib/python/App/class_init.py", line 15, in <module>
from AccessControl.PermissionRole import PermissionRole
File "/home/zenoss/zenoss/lib/python/AccessControl/__init__.py", line 17, in <module>
from Implementation import setImplementation
File "/home/zenoss/zenoss/lib/python/AccessControl/Implementation.py", line 98, in <module>
setImplementation("C")
File "/home/zenoss/zenoss/lib/python/AccessControl/Implementation.py", line 51, in setImplementation
from AccessControl import ImplC as impl
File "/home/zenoss/zenoss/lib/python/AccessControl/ImplC.py", line 18, in <module>
from cAccessControl import rolesForPermissionOn, \
File "/home/zenoss/zenoss/lib/python/AccessControl/SimpleObjectPolicies.py", line 82, in <module>
from DocumentTemplate.DT_Util import TemplateDict
File "/home/zenoss/zenoss/lib/python/DocumentTemplate/__init__.py", line 21, in <module>
from DocumentTemplate import String, File, HTML, HTMLDefault, HTMLFile
File "/home/zenoss/zenoss/lib/python/DocumentTemplate/DocumentTemplate.py", line 112, in <module>
from DT_String import String, File
File "/home/zenoss/zenoss/lib/python/DocumentTemplate/DT_String.py", line 19, in <module>
from DT_Util import ParseError, InstanceDict, TemplateDict, render_blocks, str
File "/home/zenoss/zenoss/lib/python/DocumentTemplate/DT_Util.py", line 19, in <module>
from html_quote import html_quote, ustr # for import by other modules, dont remove!
File "/home/zenoss/zenoss/lib/python/DocumentTemplate/html_quote.py", line 4, in <module>
from ustr import ustr
File "/home/zenoss/zenoss/lib/python/DocumentTemplate/ustr.py", line 18, in <module>
nasty_exception_str = Exception.__str__.im_func
AttributeError: 'wrapper_descriptor' object has no attribute 'im_func'
Whats the problem i am facing? Kindly reply soon
Regards
Hi Matt,
Kindly communicate the exact versions of
Pydev
Python
Eclipse
I have done it many times but did not succeed. I added the correct library paths but still issues. Kindly give the most authentic way to debug zenoss code in Eclipse
Regards
Back2Back KIller
I don't know about Eclipse; I just use vim.
Debugging involves nothing more than dropping breakpoints in the code:
import pdb; pdb.set_trace()
Then running Zope, or zenhub, or whatever relevant process in the foreground:
$ zopectl fg
$ zenhub run -v10
$ zencommand run -v10
...
Then stepping through it the usual pdb way.
You'll get much more information out of Zope if you turn on debug mode, by adding to $ZENHOME/etc/zope.conf:
debug-mode on
I've never used an IDE that didn't just end up getting in the way more often than it helped.
--Ian
Hi Lan McCracken
Thanks for the useful information. But i am trying to develop custom Zenpacks so doing this IDE will be pity easy. I am having Eclipse/Pydev integration issues. Again thanks so much.
Hi ALL
Kindly communicate me the exact versions of Pydev and Eclipse and an authentic way to integrate them. I am having this issue for a long time
Regards
Back 2 Back Killer
Hi All
I again set up the Eclipse/Pydev. When i try to import a module then it is appearing in the dropdown list. But when i try to compile code, it says NO MODULE FOUND. I am attaching the snapshot file.
Regards
Back 2 Back Killer
As with Ian's experience, although I haven't used an IDE since Turbo C, I find that a few xterms, a couple of instances of gvim, and zendmd do me fine. Here's what I'm doing lately:
Make things easy on yourself and figre out how to get it working without an IDE first; then you'll at least know where the problem is if you insist on using and IDE.
Oh, and if you're using ZenScriptBase, and also parsing your own command-line arguments, be sure to clear sys.argv[1:] before you grab a DMD, or because ZenScriptBase will parse them again (unless you want to pass them through intentionally).
I've gotten Zenoss Developer Chip Holden's writeup for PyDev Install and Configure Hope this helps!
Thanks,
Matt Ray
Zenoss Community Manager
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||