All Apps and Add-ons

Why am I getting "TypeError: relative imports require the 'package' argument" using Windows Infrastructure App?

New Member

Hello there,

using the Microsoft Infrastructure App (, I get the following error:

Traceback (most recent call last):
  File "/opt/splunk/lib/python2.7/site-packages/cherrypy/wsgiserver/", line 1237, in communicate
  File "/opt/splunk/lib/python2.7/site-packages/cherrypy/wsgiserver/", line 554, in respond
  File "/opt/splunk/lib/python2.7/site-packages/cherrypy/wsgiserver/", line 566, in _respond
    response = self.wsgi_app(self.environ, self.start_response)
  File "/opt/splunk/lib/python2.7/site-packages/cherrypy/", line 239, in __call__
    return app(environ, start_response)
  File "/opt/splunk/lib/python2.7/site-packages/django/core/handlers/", line 255, in __call__
    response = self.get_response(request)
  File "/opt/splunk/lib/python2.7/site-packages/django/core/handlers/", 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/", 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/", line 220, in handle_uncaught_exception
    if resolver.urlconf_module is None:
  File "/opt/splunk/lib/python2.7/site-packages/django/core/", line 342, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/opt/splunk/lib/python2.7/site-packages/django/utils/", line 35, in import_module
  File "/opt/splunk/etc/apps/framework/server/", line 129, in <module>
  File "/opt/splunk/etc/apps/framework/server/splunkdj/utility/", line 78, in create_javascript_urlpatterns
    tmpl = loader.get_template('splunkdj:jsurls.html')
  File "/opt/splunk/lib/python2.7/site-packages/django/template/", line 146, in get_template
    template, origin = find_template(template_name)
  File "/opt/splunk/lib/python2.7/site-packages/django/template/", line 129, in find_template
    loader = find_template_loader(loader_name)
  File "/opt/splunk/lib/python2.7/site-packages/django/template/", line 96, in find_template_loader
    mod = import_module(module)
  File "/opt/splunk/lib/python2.7/site-packages/django/utils/", line 35, in import_module
  File "/opt/splunk/etc/apps/framework/server/splunkdj/loaders/", line 8, in <module>
    from django.template.loaders.app_directories import (
  File "/opt/splunk/lib/python2.7/site-packages/django/template/loaders/", line 23, in <module>
    mod = import_module(app)
  File "/opt/splunk/lib/python2.7/site-packages/django/utils/", line 28, in import_module
    raise TypeError("relative imports require the 'package' argument")
TypeError: relative imports require the 'package' argument

Any advice?


0 Karma

Splunk Employee
Splunk Employee

How is your Splunk instance configured? Do you have it behind a proxy? Do you have Search Head Pooling configured?

0 Karma


Having the same Django traceback (other app) ... Did you find a solution, Marc?

0 Karma
Get Updates on the Splunk Community!

Investigate Security and Threat Detection with VirusTotal and Splunk Integration

As security threats and their complexities surge, security analysts deal with increased challenges and ...

Observability Highlights | January 2023 Newsletter

 January 2023New Product Releases Splunk Network Explorer for Infrastructure MonitoringSplunk unveils Network ...

Security Highlights | January 2023 Newsletter

January 2023 Splunk Security Essentials (SSE) 3.7.0 ReleaseThe free Splunk Security Essentials (SSE) 3.7.0 app ...