Splunk Dev

Apparently broken pycurl dependency in Splunk App

scientiamobile
Engager

Hello,

   I'm trying to develop an App for Splunk. This app contains a Python 3 script which contains some dependencies. One of these dependencies imports pycurl, but when I try to launch the script using this command: 

 

 

 

splunk cmd python3 /opt/splunk/etc/apps/wurfl_device_detection_splunk/bin/wurfl_device_detection.py

 

 

 

this is what I get:

 

 

 

Traceback (most recent call last):
  File "/opt/splunk/etc/apps/wurfl_device_detection_splunk/bin/wurfl_device_detection.py", line 45, in <module>
    wm_client = get_or_create_wm_client()
  File "/opt/splunk/etc/apps/wurfl_device_detection_splunk/bin/wurfl_device_detection.py", line 27, in get_or_create_wm_client
    globals()["wm_client"] = WmClient.create("http", wm_host, wm_port, "")
  File "/opt/splunk/etc/apps/wurfl_device_detection_splunk/bin/wmclient/wmclient.py", line 77, in create
    client = WmClient()
  File "/opt/splunk/etc/apps/wurfl_device_detection_splunk/bin/wmclient/wmclient.py", line 65, in __init__
    self.curl_post = pycurl.Curl()
AttributeError: module 'pycurl' has no attribute 'Curl'

 

 

 

 

 

 

- libcurl is properly installed

- I'm using both pycurl and wmclient dependencies in other python apps outside of Splunk and they work fine. I've copied them into the bin/ directory of my Splunk App to make them visible.

- I've copied the pycurl.cpython-38-x86_64-linux-gnu.so file into the <splunk_home>/lib/python3.7/site-packages directory. 

 

But I'm still getting this error message.

Am I missing something? Should I put the .so file somewhere else? From the backtrace I'd guess that the pycurl python script is found but it cannot find the libcurl it wraps.

Any suggestion?

Labels (2)
Tags (3)
0 Karma
Get Updates on the Splunk Community!

Index This | What did the zero say to the eight?

June 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

Splunk Observability Cloud's AI Assistant in Action Series: Onboarding New Hires & ...

This is the fifth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Now Playing: Splunk Education Summer Learning Premieres

It’s premiere season, and Splunk Education is rolling out new releases you won’t want to miss. Whether you’re ...