<?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: Unable to run Pyhton script which came default with Cybereason app in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Unable-to-run-Pyhton-script-which-came-default-with-Cybereason/m-p/544642#M9779</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The issue got resolved by adding Splunk home path in environment variables. But another problem started as shown below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[root@Searchhead2 bin]# vi cybereason.py&lt;BR /&gt;[root@Searchhead2 bin]# splunk cmd python cybereason.py&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "cybereason.py", line 25, in &amp;lt;module&amp;gt;&lt;BR /&gt;_SPLUNK_HOME = make_splunkhome_path([""])&lt;BR /&gt;NameError: name 'make_splunkhome_path' is not defined&lt;BR /&gt;[root@Searchhead2 bin]#&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could some one let me know what is the error related to.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I understood like we need to define make_splunk_home_path. But don't know where to define.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly help me with the same.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Reddi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 20 Mar 2021 19:31:13 GMT</pubDate>
    <dc:creator>Reddi694325</dc:creator>
    <dc:date>2021-03-20T19:31:13Z</dc:date>
    <item>
      <title>Unable to run Pyhton script which came default with Cybereason app</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Unable-to-run-Pyhton-script-which-came-default-with-Cybereason/m-p/544625#M9774</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Reddi694325_0-1616254180384.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13406i91B8670920B5844E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Reddi694325_0-1616254180384.png" alt="Reddi694325_0-1616254180384.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I ran the python script the above error throwing as shown in the screen shot. Installed python3 on the environment.&amp;nbsp; Could some help me with the same.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Mar 2021 15:34:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Unable-to-run-Pyhton-script-which-came-default-with-Cybereason/m-p/544625#M9774</guid>
      <dc:creator>Reddi694325</dc:creator>
      <dc:date>2021-03-20T15:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run Pyhton script which came default with Cybereason app</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Unable-to-run-Pyhton-script-which-came-default-with-Cybereason/m-p/544627#M9775</link>
      <description>&lt;P&gt;There's no need to install Python 3 because it comes with Splunk Enterprise.&amp;nbsp; Be sure to run the scripts that come with apps in the Splunk environment.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;splunk cmd python cybereason.py&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 20 Mar 2021 16:48:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Unable-to-run-Pyhton-script-which-came-default-with-Cybereason/m-p/544627#M9775</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-03-20T16:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run Pyhton script which came default with Cybereason app</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Unable-to-run-Pyhton-script-which-came-default-with-Cybereason/m-p/544629#M9776</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Reddi694325_0-1616259108731.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13407i043DFDAA01F313C7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Reddi694325_0-1616259108731.png" alt="Reddi694325_0-1616259108731.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hi richgalloway,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran it but no positive sign. I am unable to understand where am I missing&lt;/P&gt;</description>
      <pubDate>Sat, 20 Mar 2021 16:53:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Unable-to-run-Pyhton-script-which-came-default-with-Cybereason/m-p/544629#M9776</guid>
      <dc:creator>Reddi694325</dc:creator>
      <dc:date>2021-03-20T16:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run Pyhton script which came default with Cybereason app</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Unable-to-run-Pyhton-script-which-came-default-with-Cybereason/m-p/544633#M9777</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/125236"&gt;@Reddi694325&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you are running the command in&amp;nbsp;/opt/splunk/bin&amp;nbsp; &amp;nbsp;.But the script was exist in&amp;nbsp; /opt/splunk/etc/apps/cybearreasonforsplunk/bin directory.&lt;/P&gt;&lt;P&gt;Run the command in&amp;nbsp;/opt/splunk/etc/apps/cybearreasonforsplunk/bin/splunk cmd python cybereason.py&amp;nbsp;&lt;/P&gt;&lt;P&gt;And see whether its works or not.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Mar 2021 17:46:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Unable-to-run-Pyhton-script-which-came-default-with-Cybereason/m-p/544633#M9777</guid>
      <dc:creator>Vardhan</dc:creator>
      <dc:date>2021-03-20T17:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run Pyhton script which came default with Cybereason app</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Unable-to-run-Pyhton-script-which-came-default-with-Cybereason/m-p/544636#M9778</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Reddi694325_0-1616262833758.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13410i40DB1DD187BC4441/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Reddi694325_0-1616262833758.png" alt="Reddi694325_0-1616262833758.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Vardhan,&lt;/P&gt;&lt;P&gt;In the previous case I ran in both the places like from Splunk_Home/bin and from App/Bin. For better understanding&amp;nbsp; I ran the command as you suggested and the screenshot is pasted here. Kindly check and help me with the same.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks In Advance.&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Reddy.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Mar 2021 17:54:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Unable-to-run-Pyhton-script-which-came-default-with-Cybereason/m-p/544636#M9778</guid>
      <dc:creator>Reddi694325</dc:creator>
      <dc:date>2021-03-20T17:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run Pyhton script which came default with Cybereason app</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Unable-to-run-Pyhton-script-which-came-default-with-Cybereason/m-p/544642#M9779</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The issue got resolved by adding Splunk home path in environment variables. But another problem started as shown below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[root@Searchhead2 bin]# vi cybereason.py&lt;BR /&gt;[root@Searchhead2 bin]# splunk cmd python cybereason.py&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "cybereason.py", line 25, in &amp;lt;module&amp;gt;&lt;BR /&gt;_SPLUNK_HOME = make_splunkhome_path([""])&lt;BR /&gt;NameError: name 'make_splunkhome_path' is not defined&lt;BR /&gt;[root@Searchhead2 bin]#&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could some one let me know what is the error related to.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I understood like we need to define make_splunk_home_path. But don't know where to define.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly help me with the same.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Reddi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Mar 2021 19:31:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Unable-to-run-Pyhton-script-which-came-default-with-Cybereason/m-p/544642#M9779</guid>
      <dc:creator>Reddi694325</dc:creator>
      <dc:date>2021-03-20T19:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run Pyhton script which came default with Cybereason app</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Unable-to-run-Pyhton-script-which-came-default-with-Cybereason/m-p/544661#M9780</link>
      <description>&lt;P&gt;Hi team,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally cracked it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Step -1&lt;/P&gt;&lt;P&gt;Might have to add environment variables for Splunk and check whether are you able to run Splunk command globally.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Step -2&amp;nbsp;&lt;/P&gt;&lt;P&gt;Import the proper module related to the script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:-&amp;nbsp;&lt;BR /&gt;The below screen shot indicates the error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Reddi694325_0-1616302900730.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13415i8D16EFAAF97BEA16/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Reddi694325_0-1616302900730.png" alt="Reddi694325_0-1616302900730.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;to resolve the above issue below module need to import&amp;nbsp;&lt;/P&gt;&lt;P&gt;from splunk.appserver.mrsparkle.lib.util import make_splunkhome_path&lt;/P&gt;&lt;P&gt;Post importing the module the issue resolved&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Reddi.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Mar 2021 05:04:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Unable-to-run-Pyhton-script-which-came-default-with-Cybereason/m-p/544661#M9780</guid>
      <dc:creator>Reddi694325</dc:creator>
      <dc:date>2021-03-21T05:04:22Z</dc:date>
    </item>
  </channel>
</rss>

