All Apps and Add-ons

App Packager - Exception: , Value: list index out of range

MikeElliott
Communicator

Hi Team,

I'm attempting to package an app for an internal deployment.

I run the below command:

./splunk package app /Applications/Splunk/etc/apps/<my_app_name>/

I am then met with the below error:

An unforeseen error occurred:

    Exception: <type 'exceptions.IndexError'>, Value: list index out of range

Traceback (most recent call last):
  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/clilib/cli.py", line 1145, in main
    parseAndRun(argsList)
  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/clilib/cli.py", line 943, in parseAndRun
    retVal = makeRestCall(cmd=command, obj=subCmd, restArgList=objUnicode(argList), sessionKey=authInfo, timeout=timeout)
  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/rcUtils.py", line 666, in makeRestCall
    DISPLAY_CHARS[endpoint](cmd=cmd, obj=obj, type=etype, serverResponse=serverResponse, serverContent=serverContent, sessionKey=sessionKey, eaiArgsList=eaiArgsList)
  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/rcDisplay.py", line 187, in wrapper
    return f(**kwargs)
  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/rcDisplay.py", line 165, in wrapper
    return f(**kwargs)
  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/rcDisplay.py", line 706, in displayApp
    d = nodeToPrimitive(atomFeed[0].rawcontents)
  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/rest/format.py", line 382, in __getitem__
    return self.entries.__getitem__(idx)
IndexError: list index out of range


Please file a case online at http://www.splunk.com/page/submit_issue

This is a particularly enraging issue, as this worked perfectly fine yesterday, stopped working today and still does not work after a fresh install of Splunk Enterprise in my Dev environment.

Any suggestions?

1 Solution

MikeElliott
Communicator

I got this to work by doing the following:

/Applications/Splunk/bin/splunk package app <my_app_name>/

I would, however, still like to invite comment. I'd like to know what I was doing wrong so that I can avoid it in the future and not come up with solutions by rage-bashing XD

View solution in original post

0 Karma

MikeElliott
Communicator

I got this to work by doing the following:

/Applications/Splunk/bin/splunk package app <my_app_name>/

I would, however, still like to invite comment. I'd like to know what I was doing wrong so that I can avoid it in the future and not come up with solutions by rage-bashing XD

0 Karma

cduffey_splunk
Splunk Employee
Splunk Employee

This didn't work for me, but I was able to get the following to work:

cd to SPLUNK_HOME/etc/apps

SPLUNK_HOME/bin/splunk package app

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...