All Apps and Add-ons

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

marcus_proest
New Member

Hello there,

using the Microsoft Infrastructure App (https://apps.splunk.com/app/1680/), I get the following error:

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 129, in <module>
    jsurls.create_javascript_urlpatterns()
  File "/opt/splunk/etc/apps/framework/server/splunkdj/utility/jsurls.py", line 78, in create_javascript_urlpatterns
    tmpl = loader.get_template('splunkdj:jsurls.html')
  File "/opt/splunk/lib/python2.7/site-packages/django/template/loader.py", line 146, in get_template
    template, origin = find_template(template_name)
  File "/opt/splunk/lib/python2.7/site-packages/django/template/loader.py", line 129, in find_template
    loader = find_template_loader(loader_name)
  File "/opt/splunk/lib/python2.7/site-packages/django/template/loader.py", line 96, in find_template_loader
    mod = import_module(module)
  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/splunkdj/loaders/template_loader.py", line 8, in <module>
    from django.template.loaders.app_directories import (
  File "/opt/splunk/lib/python2.7/site-packages/django/template/loaders/app_directories.py", line 23, in <module>
    mod = import_module(app)
  File "/opt/splunk/lib/python2.7/site-packages/django/utils/importlib.py", line 28, in import_module
    raise TypeError("relative imports require the 'package' argument")
TypeError: relative imports require the 'package' argument

Any advice?

Thanks,
Marc

0 Karma

ahall_splunk
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

Rocket66
Communicator

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

0 Karma
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 ...