<?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 Re: Splunk Enterprise Python SDK doesn't recognize custom search command in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-Enterprise-Python-SDK-doesn-t-recognize-custom-search/m-p/501373#M8993</link>
    <description>&lt;P&gt;My commands.conf file was not in the correct format (i.e. hidden characters).  Once that issue was resolved, the mycommand.py file could not be found so I removed the filename=mycommand.py from the commands.conf file and everything worked.  This was my first question to the forum - unsure how to close it.  I see no option for rescinding the question.&lt;/P&gt;</description>
    <pubDate>Wed, 05 Feb 2020 20:26:08 GMT</pubDate>
    <dc:creator>kmstepien</dc:creator>
    <dc:date>2020-02-05T20:26:08Z</dc:date>
    <item>
      <title>Splunk Enterprise Python SDK doesn't recognize custom search command</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-Enterprise-Python-SDK-doesn-t-recognize-custom-search/m-p/501372#M8992</link>
      <description>&lt;P&gt;I have a test environment on my laptop.  I get the following error:&lt;BR /&gt;&lt;BR /&gt;
Unknown search command 'mycommand'.&lt;/P&gt;

&lt;P&gt;Details are:&lt;BR /&gt;
- Using Splunk Enterprise 8.0.1 on macOS running Mojave&lt;BR /&gt;
- Created a new app called python_sdk_app and revised permissions to “All apps”&lt;BR /&gt;
- Installed Splunk SDK 1.6.11 in bin folder of the app using ‘pip install -t . splunk-sdk’&lt;BR /&gt;
- Created commands.conf inside the default directory of the app (also tried the local directory)&lt;BR /&gt;
- Restarted splunk&lt;/P&gt;

&lt;P&gt;commands.conf file:&lt;BR /&gt;
[mycommand]&lt;BR /&gt;
chunked=true &lt;BR /&gt;
filename=mycommand.py&lt;/P&gt;

&lt;P&gt;package locations:&lt;BR /&gt;
$ python -m site&lt;BR /&gt;
sys.path = [&lt;BR /&gt;
    '/Applications/Splunk/splunk-sdk-python-1.6.11',&lt;BR /&gt;
    '/anaconda3/lib/python36.zip',&lt;BR /&gt;
    '/anaconda3/lib/python3.6',&lt;BR /&gt;
    '/anaconda3/lib/python3.6/lib-dynload',&lt;BR /&gt;
    '/anaconda3/lib/python3.6/site-packages',&lt;BR /&gt;
    '/anaconda3/lib/python3.6/site-packages/aeosa',&lt;BR /&gt;
    '/anaconda3/lib/python3.6/site-packages/splunk_sdk-1.6.11-py3.6.egg',&lt;BR /&gt;
]&lt;/P&gt;

&lt;P&gt;environment variables:&lt;BR /&gt;
SHELL=/bin/bash&lt;BR /&gt;
SPLUNK_HOME=/Applications/Splunk&lt;BR /&gt;
PATH=/Library/Frameworks/Python.framework/Versions/3.6/bin:/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin&lt;BR /&gt;
PYTHONPATH=/Applications/Splunk/splunk-sdk-python-1.6.11&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:00:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-Enterprise-Python-SDK-doesn-t-recognize-custom-search/m-p/501372#M8992</guid>
      <dc:creator>kmstepien</dc:creator>
      <dc:date>2020-09-30T04:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Enterprise Python SDK doesn't recognize custom search command</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-Enterprise-Python-SDK-doesn-t-recognize-custom-search/m-p/501373#M8993</link>
      <description>&lt;P&gt;My commands.conf file was not in the correct format (i.e. hidden characters).  Once that issue was resolved, the mycommand.py file could not be found so I removed the filename=mycommand.py from the commands.conf file and everything worked.  This was my first question to the forum - unsure how to close it.  I see no option for rescinding the question.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 20:26:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-Enterprise-Python-SDK-doesn-t-recognize-custom-search/m-p/501373#M8993</guid>
      <dc:creator>kmstepien</dc:creator>
      <dc:date>2020-02-05T20:26:08Z</dc:date>
    </item>
  </channel>
</rss>

