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!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...