All Apps and Add-ons

Question on Splunk Django framework

theouhuios
Motivator

Hello I am following this link in trying to create an app in Django framework. After eveything in Step 1 when I click on the app name it gives a python error. Does Splunk need python 2.7 to be installed to make this work? We have 2.4 installed on our Search Head.

Traceback (most recent call last):
  File "/opt/splunk/lib/python2.7/site-packages/cherrypy/wsgiserver/__init__.py", line 1237, in communicate
    req.respond()
  File "/opt/splunk/lib/python2.7/site-packages/cherrypy/wsgiserver/__init__.py", line 554, in respond
    self._respond()
  File "/opt/splunk/lib/python2.7/site-packages/cherrypy/wsgiserver/__init__.py", line 566, in _respond
    response = self.wsgi_app(self.environ, self.start_response)
  File "/opt/splunk/lib/python2.7/site-packages/cherrypy/_cptree.py", line 239, in __call__
    return app(environ, start_response)
  File "/opt/splunk/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 255, in __call__
    response = self.get_response(request)
  File "/opt/splunk/lib/python2.7/site-packages/django/core/handlers/base.py", line 178, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/opt/splunk/etc/apps/framework/server/splunkdj/management/commands/runwsgiserver.py", line 189, in handle_uncaught_exception
    return super(LoggingWSGIHandler, self).handle_uncaught_exception(request, resolver, exc_info, *args, **kwargs)
  File "/opt/splunk/lib/python2.7/site-packages/django/core/handlers/base.py", line 220, in handle_uncaught_exception
    if resolver.urlconf_module is None:
  File "/opt/splunk/lib/python2.7/site-packages/django/core/urlresolvers.py", line 342, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/opt/splunk/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/opt/splunk/etc/apps/framework/server/urls.py", line 68, in <module>
    app_module = importlib.import_module(app)
  File "/opt/splunk/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
ImportError: No module named search
0 Karma
1 Solution

aelliott
Motivator

Yes, it appears that you need Python 2.7

Requirements

Here are the Web Framework requirements for this release:

https://github.com/splunk/splunk-webframework

Operating system: Windows, Linux or Mac OS X.

Web browser: Latest versions of Chrome, Safari, or Firefox; Internet Explorer 9 or later.

The Splunk Web Framework: The Web Framework is available as a ZIP file from GitHub and as a Git repository.

Splunk: Splunk 5.0 or later.

Note The Web Framework is already included with Splunk 6.0 and later.

Programming language: Python 2.7.

View solution in original post

aelliott
Motivator

Yes, it appears that you need Python 2.7

Requirements

Here are the Web Framework requirements for this release:

https://github.com/splunk/splunk-webframework

Operating system: Windows, Linux or Mac OS X.

Web browser: Latest versions of Chrome, Safari, or Firefox; Internet Explorer 9 or later.

The Splunk Web Framework: The Web Framework is available as a ZIP file from GitHub and as a Git repository.

Splunk: Splunk 5.0 or later.

Note The Web Framework is already included with Splunk 6.0 and later.

Programming language: Python 2.7.

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...