All Apps and Add-ons

loadImData.py

edonze
Path Finder

I get the following errors:

10-24-2012 06:29:51.305 -0700 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/InterMapper/bin/loadImData.py" AttributeError: 'module' object has no attribute 'handlers'
10-24-2012 06:29:51.305 -0700 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/InterMapper/bin/loadImData.py" logger.handlers.RotatingFileHandler('imAppLog.log',maxBytes=100)
10-24-2012 06:29:51.305 -0700 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/InterMapper/bin/loadImData.py" File "/opt/splunk/etc/apps/InterMapper/bin/loadImData.py", line 39, in
10-24-2012 06:29:51.305 -0700 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/InterMapper/bin/loadImData.py" Traceback (most recent call last):

Line 39 that it refers to is:

logger.handlers.RotatingFileHandler('imAppLog.log',maxBytes=100)

This link:
http://stackoverflow.com/questions/3781522/why-do-python-modules-sometimes-not-import-their-sub-modu...

seems to indicate that it isn't loading all of the modules, but it doesn't mention how to load them with an alias as in the line below:

import logging as logger

0 Karma

Drainy
Champion

Edit the lines relating to logging near the top of loadImData.py to;

if debug:
  logger.basicConfig(level=logger.DEBUG, format='%(asctime)s log_level=%(levelname)s %(message)s',filename=os.path.join(dirname(__file__),'..','local','imDebugLog.log'),filemode='a')

else:
  logger.basicConfig(level=logger.INFO, format='%(asctime)s log_level=%(levelname)s %(message)s',filename=os.path.join(dirname(__file__),'..','local','imAppLog.log'),filemode='a')

where the lines after if debug and else: are on a single line and not wrapped as above 🙂

A new version with a fix should hopefully be coming shortly, in the meantime this will fix it up.

0 Karma

edonze
Path Finder

Our environment is similar.

0 Karma

jasonkorcettcom
New Member

Me too.. I have a pretty base centos 6.3 box. Specifically for splunk.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...