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.

Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...