<?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: Why is the Python script input data show no result in search? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Why-is-the-Python-script-input-data-show-no-result-in-search/m-p/350208#M5573</link>
    <description>&lt;P&gt;@csimonnet, to debug can you please try the following link to write error logs to Splunk's _internal index using sys.stderror.write to ensure that Script is executing?&lt;/P&gt;

&lt;P&gt;&lt;A href="https://sublimerobots.com/2017/01/simple-splunk-scripted-input-example/"&gt;https://sublimerobots.com/2017/01/simple-splunk-scripted-input-example/&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sys.stderr.write("Python script is starting up\n") 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Refer to a recent answer, have you scheduled your Python scripted input in Splunk? &lt;A href="https://answers.splunk.com/answers/628853/how-to-add-scripts-as-data-input.html"&gt;https://answers.splunk.com/answers/628853/how-to-add-scripts-as-data-input.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Apr 2018 18:11:00 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2018-04-19T18:11:00Z</dc:date>
    <item>
      <title>Why is the Python script input data show no result in search?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Why-is-the-Python-script-input-data-show-no-result-in-search/m-p/350207#M5572</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
I have a python scripted input which doesn't return any result in the search and I don't understand why because I can run my script in the terminal computer with the user splunk:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;splunk@splunk1:~/etc/apps/bike_sharing/bin$ python NYC_predict_bike.py &lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;extract of the result:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;[{"FCTTIME":1524250800000,"conds":"Clear","dewptm":"-5","fctcode":1,"feelslike":"5","heatindex":"-9999","hum":39,"icon":"clear","mslp":"1023","pop":0,"qpf":"0","sky":11,"snow":"0","tempm":"8","uvi":0,"wdir":"NW","windchill":"5","wspd":"19","TZ":7200000,"dock_id":"3681","capacity":0,"eightd_has_key_dispenser":false,"eightd_station_services":null,"lat":40.7151776773,"lon":-74.0376833081,"name":"Grand St","region_id":null,"rental_methods":["KEY","CREDITCARD"],"short_name":"JC102"}]&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:08:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Why-is-the-Python-script-input-data-show-no-result-in-search/m-p/350207#M5572</guid>
      <dc:creator>csimonnet</dc:creator>
      <dc:date>2020-09-29T19:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the Python script input data show no result in search?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Why-is-the-Python-script-input-data-show-no-result-in-search/m-p/350208#M5573</link>
      <description>&lt;P&gt;@csimonnet, to debug can you please try the following link to write error logs to Splunk's _internal index using sys.stderror.write to ensure that Script is executing?&lt;/P&gt;

&lt;P&gt;&lt;A href="https://sublimerobots.com/2017/01/simple-splunk-scripted-input-example/"&gt;https://sublimerobots.com/2017/01/simple-splunk-scripted-input-example/&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sys.stderr.write("Python script is starting up\n") 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Refer to a recent answer, have you scheduled your Python scripted input in Splunk? &lt;A href="https://answers.splunk.com/answers/628853/how-to-add-scripts-as-data-input.html"&gt;https://answers.splunk.com/answers/628853/how-to-add-scripts-as-data-input.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 18:11:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Why-is-the-Python-script-input-data-show-no-result-in-search/m-p/350208#M5573</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-04-19T18:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the Python script input data show no result in search?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Why-is-the-Python-script-input-data-show-no-result-in-search/m-p/350209#M5574</link>
      <description>&lt;P&gt;Thanks, &lt;BR /&gt;
now I can see a new error:&lt;BR /&gt;
import pandas as pd &lt;BR /&gt;
 &lt;CODE&gt;File "/opt/splunk/etc/apps/Splunk_SA_Scientific_Python_linux_x86_64/bin/linux_x86_64/lib/python2.7/site-packages/pandas/__init__.py", line 13, in &lt;BR /&gt;
    "extensions first.".format(module))&lt;BR /&gt;
ImportError: C extension: No module named ctypes not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace' to build the C extensions first.&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I tried to fix it but I can't install ctypes and upgrading numpy doesn't change anything.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 09:09:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Why-is-the-Python-script-input-data-show-no-result-in-search/m-p/350209#M5574</guid>
      <dc:creator>csimonnet</dc:creator>
      <dc:date>2018-04-20T09:09:44Z</dc:date>
    </item>
  </channel>
</rss>

