Developing for Splunk Enterprise
Highlighted

Import Python Module when creating a new Splunk App

New Member

Hello,

I am trying to create a new app which requires a python module not included in Splunk. I read somewhere that you can copy the modules and dependencies to the etc/apps/app/bin. When I do that and try to just import the module I get the following error:

Traceback (most recent call last):
File "/opt/splunk/etc/apps/TA-limac/bin/lcpythontest1563939006862.py", line 14, in
import input
modulelcpythontest1563939006862 as inputmodule
File "/opt/splunk/etc/apps/TA-limac/bin/input
modulelcpythontest1563939006862.py", line 8, in
import limacharlie
File "/opt/splunk/etc/apps/TA-limac/bin/limacharlie/init.py", line 41, in
from .Manager import Manager
File "/opt/splunk/etc/apps/TA-limac/bin/limacharlie/Manager.py", line 26, in
from .Sensor import Sensor
File "/opt/splunk/etc/apps/TA-limac/bin/limacharlie/Sensor.py", line 5, in
from .utils import *
File "/opt/splunk/etc/apps/TA-limac/bin/limacharlie/utils.py", line 7, in
import gevent.event
File "/opt/splunk/etc/apps/TA-limac/bin/gevent/init.py", line 87, in
from gevent.hublocal import gethub
File "/opt/splunk/etc/apps/TA-limac/bin/gevent/
hublocal.py", line 101, in
import
caccel(globals(), 'gevent.hublocal')
File "/opt/splunk/etc/apps/TA-limac/bin/gevent/util.py", line 105, in importcaccel
mod = importlib.import
module(cname)
File "/opt/splunk/lib/python2.7/importlib/init.py", line 37, in importmodule
_
import(name)
ImportError: /opt/splunk/etc/apps/TA-limac/bin/gevent/
hublocal.so: undefined symbol: PyUnicodeUCS4DecodeUTF8

Has anyone gotten this before or know a different way to create this app while still using the python module?

Labels (3)
0 Karma
Highlighted

Re: Import Python Module when creating a new Splunk App

New Member

Did you find a solution to this? Experiencing the same thing while building out a custom search command and attempting to use gevent/grequests

0 Karma