Archive

Unable to install appinspect v1.4

gwobben
Communicator

Hi I keep getting this error when I try to run version 1.4. 1.2 worked fine.. I'm using a fresh Debian jessie install:

Traceback (most recent call last):
  File "/usr/local/bin/splunk-appinspect", line 9, in <module>
    load_entry_point('splunk-appinspect==1.4.0.86', 'console_scripts', 'splunk-appinspect')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 356, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2476, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2195, in load
    raise ImportError("%r has no %r attribute" % (entry, attr))
ImportError: <module 'splunk_appinspect' from '/usr/local/lib/python2.7/dist-packages/splunk_appinspect/__init__.pyc'> has no 'main' attribute

Any ideas?

1 Solution

tpavlik_splunk
Splunk Employee
Splunk Employee

Sorry for the delay all, we have created a hotfix that will hopefully address the issue in AppInspect v1.4.1.88 available at the updated download link here: http://dev.splunk.com/view/SP-CAAAFAK

Please let us know if you continue to see issues.

View solution in original post

0 Karma

harish_l
New Member

How to run the appinspect through cmd in windows machine

0 Karma

tpavlik_splunk
Splunk Employee
Splunk Employee

Sorry for the delay all, we have created a hotfix that will hopefully address the issue in AppInspect v1.4.1.88 available at the updated download link here: http://dev.splunk.com/view/SP-CAAAFAK

Please let us know if you continue to see issues.

View solution in original post

0 Karma

harish_l
New Member

How to run the appinspect through cmd in windows machine

0 Karma

aaraneta_splunk
Splunk Employee
Splunk Employee

@gwobben - If the fix linked by tpavlik provided the solution to your question, please make sure you mark "Accept" under his answer. Thanks!

0 Karma

rjthibod
Champion

I had the same issue (ubuntu 16.04, no virtualenv).

I already had version 1.3 installed, so I uninstalled the splunk-appinstall pip module and then installed the new version freshly. It worked after that.

tpavlik_splunk
Splunk Employee
Splunk Employee

I'm able to run with no issues via a virtualenv on Debian Jessie - is that an option for you?

apt-get update
apt-get install python-pip
pip install virtualenv
virtualenv venv
source venv/bin/activate
pip install splunk-appinspect-1.4.0.86.tar.gz
splunk-appinspect --help

The error you're getting could be related to the previous version of appinspect (if /usr/local/lib/python2.7/dist-packages/splunk_appinspect/init.pyc was compiled using the older version then "main" would not exist) but since you indicated a clean install that shouldn't be the issue.

pgowdapp
Engager

I had followed a slightly different script ie., used mkvirtualenv (from virtualenvwrapper) to create a virtualenv, but the error remains the same.

0 Karma

tpavlik_splunk
Splunk Employee
Splunk Employee

Does the path in your error "/usr/local/bin/splunk-appinspect" match the virtualenv created via mkvirtualenv?

which splunk-appinspectshould correspond to the virtualenv path.

0 Karma

pgowdapp
Engager
(appinspect14)➜  ~ which splunk-appinspect
/Users/pgowda/.virtualenvs/appinspect14/bin/splunk-appinspect
(appinspect14)➜  ~ splunk-appinspect      
Traceback (most recent call last):
  File "/Users/pgowda/.virtualenvs/appinspect14/bin/splunk-appinspect", line 9, in <module>
    load_entry_point('splunk-appinspect==1.4.0.86', 'console_scripts', 'splunk-appinspect')()
  File "/Users/pgowda/.virtualenvs/appinspect14/lib/python2.7/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Users/pgowda/.virtualenvs/appinspect14/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
    return ep.load()
  File "/Users/pgowda/.virtualenvs/appinspect14/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
    return self.resolve()
  File "/Users/pgowda/.virtualenvs/appinspect14/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2365, in resolve
    raise ImportError(str(exc))
ImportError: 'module' object has no attribute 'main'
0 Karma

tpavlik_splunk
Splunk Employee
Splunk Employee
0 Karma

tpavlik_splunk
Splunk Employee
Splunk Employee

We have identified the issue on our end and will have a hotfix ASAP. Sorry for the inconvenience and thank you for your patience! If you want to apply the hotfix yourself you should be able to add import main on a single line to /Users/pgowda/.virtualenvs/appinspect14/lib/python2.7/site-packages/splunk_appinspect/__init__.py

0 Karma

pgowdapp
Engager

The hotfix worked. FTR, the actual file I edited to add the import main statement was : ~/.virtualenvs/appinspect14/lib/python2.7/site-packages/splunk_appinspect-1.4.0.86-py2.7.egg/splunk_appinspect/__init__.py

0 Karma

gwobben
Communicator

Fantastic! Could you let us know when the fix is released? I'll accept the new release as the answer to this question.

0 Karma

tpavlik_splunk
Splunk Employee
Splunk Employee

Will do, it is in QA now and should be posted in the next day or two here: http://dev.splunk.com/view/SP-CAAAFAK

I will post a new answer as soon as it is up.

0 Karma
Take the 2021 Splunk Career Survey

Help us learn about how Splunk has
impacted your career by taking the 2021 Splunk Career Survey.

Earn $50 in Amazon cash!