<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Apparently broken pycurl dependency in Splunk App in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Apparently-broken-pycurl-dependency-in-Splunk-App/m-p/524674#M9392</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;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:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;splunk cmd python3 /opt/splunk/etc/apps/wurfl_device_detection_splunk/bin/wurfl_device_detection.py&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is what I get:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Traceback (most recent call last):
  File "/opt/splunk/etc/apps/wurfl_device_detection_splunk/bin/wurfl_device_detection.py", line 45, in &amp;lt;module&amp;gt;
    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'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- libcurl is properly installed&lt;/P&gt;&lt;P&gt;- 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.&lt;/P&gt;&lt;P&gt;- I've copied the&amp;nbsp;&lt;STRONG&gt;pycurl.cpython-38-x86_64-linux-gnu.so &lt;/STRONG&gt;file into the &amp;lt;splunk_home&amp;gt;/lib/python3.7/site-packages directory.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I'm still getting this error message.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Any suggestion?&lt;/P&gt;</description>
    <pubDate>Wed, 14 Oct 2020 16:02:50 GMT</pubDate>
    <dc:creator>scientiamobile</dc:creator>
    <dc:date>2020-10-14T16:02:50Z</dc:date>
    <item>
      <title>Apparently broken pycurl dependency in Splunk App</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Apparently-broken-pycurl-dependency-in-Splunk-App/m-p/524674#M9392</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;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:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;splunk cmd python3 /opt/splunk/etc/apps/wurfl_device_detection_splunk/bin/wurfl_device_detection.py&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is what I get:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Traceback (most recent call last):
  File "/opt/splunk/etc/apps/wurfl_device_detection_splunk/bin/wurfl_device_detection.py", line 45, in &amp;lt;module&amp;gt;
    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'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- libcurl is properly installed&lt;/P&gt;&lt;P&gt;- 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.&lt;/P&gt;&lt;P&gt;- I've copied the&amp;nbsp;&lt;STRONG&gt;pycurl.cpython-38-x86_64-linux-gnu.so &lt;/STRONG&gt;file into the &amp;lt;splunk_home&amp;gt;/lib/python3.7/site-packages directory.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I'm still getting this error message.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Any suggestion?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 16:02:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Apparently-broken-pycurl-dependency-in-Splunk-App/m-p/524674#M9392</guid>
      <dc:creator>scientiamobile</dc:creator>
      <dc:date>2020-10-14T16:02:50Z</dc:date>
    </item>
  </channel>
</rss>

