TECHZEN Zenoss User Community ARCHIVE  

Newly Created ZenPack Export

Subject: Newly Created ZenPack Export
Author: Sean Hummel
Posted: 2017-05-25 09:37

I'm working on creating some ZenPacks, and have followed the ZenPackSDK and everything is working fine.  When I try and export my ZenPack to get the .egg file to install on another Zenoss system for testing, I get the following error:

Type: <type 'exceptions.NameError'>
Value: global name 'app' is not defined

Traceback (most recent call last):
File "/opt/zenoss/lib/python2.7/site-packages/ZPublisher/Publish.py", line 126, in publish
request, bind=1)
File "/opt/zenoss/lib/python2.7/site-packages/ZPublisher/mapply.py", line 77, in mapply
if debug is not None: return debug(object,args,context)
File "/opt/zenoss/lib/python2.7/site-packages/ZPublisher/Publish.py", line 46, in call_object
result=apply(object,args) # Type s<cr> to step into published object.
File "/opt/zenoss/ZenPacks/ZenPacks.zenoss.ZenPackLib-2.0.5.egg/ZenPacks/zenoss/ZenPackLib/lib/base/ZenPack.py", line 430, in manage_exportPack
self.filter_xml(app, filename)
NameError: global name 'app' is not defined

I have checked permissions of my ZenPack folder in the /z directory and everything looks ok, and it does actually create an egg file, but the egg file won't install on another Zenoss instance.

------------------------------
Sean Hummel
------------------------------


Subject: RE: Newly Created ZenPack Export
Author: Russell Dwarshuis
Posted: 2017-05-25 16:40

I'm having almost exactly the same problem (also using ZenPackLib 2.0.5)  I did not try installing the .egg file that was created.  I'm developing on 4.2.5 and when I try to export the zenpack, I get an error in the GUI and event.log says:

2017-05-25T16:22:31 ERROR Zope.SiteErrorLog 1495743751.290.702377476948 /zport/dmd/ZenPackManager/packs/ZenPacks.community.Maddash/viewPackDetail.pt
Traceback (innermost last):
  Module ZPublisher.Publish, line 126, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 46, in call_object
  Module ZenPacks.zenoss.ZenPackLib.lib.base.ZenPack, line 430, in manage_exportPack
NameError: global name 'app' is not defined

I think this is a ZenPackLib bug, or maybe the documentation for using ZenPackLib is missing something important because I can't find anything wrong with my zenpack.  If anybody wants to look, my zenpack is at https://github.com/kb8u/ZenPacks.community.Maddash.git

------------------------------
Russell Dwarshuis
Merit Network, Inc.
------------------------------

Subject: RE: Newly Created ZenPack Export
Author: Jane Curry
Posted: 2017-05-30 15:40

What version of Zenoss are you using?
Cheers,
Jane

------------------------------
Jane Curry
Skills 1st United Kingdom
jane.curry@skills-1st.co.uk
------------------------------


Subject: RE: Newly Created ZenPack Export
Author: Sean Hummel
Posted: 2017-05-30 16:32

Jane,

Using 5.2.4 Core with version 2.0.5 of zenpacklib

------------------------------
Sean Hummel
------------------------------


Subject: RE: Newly Created ZenPack Export
Author: Sean Hummel
Posted: 2017-05-31 09:56

Just to update the thread, I was successfully able to export my ZenPack using Core 5.2.3 and ZenPackLib version 2.0.4.  After I upgraded ZenPackLib to 2.0.5 I got the same error again, so it appears to be a bug with the latest version of ZenPackLib.

------------------------------
Sean Hummel
------------------------------


Subject: RE: Newly Created ZenPack Export
Author: Patrick McMahon
Posted: 2017-05-31 11:56

Confirmed. Bug will be fixed in version 2.0.6+

------------------------------
Patrick McMahon
Sr. Client Services Engineer
Zenoss
------------------------------


< Previous
HOW the heck....Set/move to Location using API
  Next
Query on Zenpack
>