<?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 Python SDK for Splunk (JSONResultsReader) not working in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-for-Splunk-JSONResultsReader-not-working/m-p/698049#M11685</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;oneshotsearch_results = service.jobs.oneshot(searchquery_oneshot, **kwargs_oneshot)&lt;BR /&gt;reader = results.JSONResultsReader(oneshotsearch_results)&lt;/P&gt;&lt;P&gt;for item in reader:&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(isinstance(item, dict)):&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; for key in item:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if(key == '&amp;lt;...&amp;gt;'):&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A = str(item[key])&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print('A is :',A)&lt;BR /&gt;&lt;BR /&gt;The above code was working till yesterday. Now it does not enter the 1st for loop (i.e. for item in reader) anymore. I verified this by adding a print statement before the 1st if statement and it is not printing.&lt;/P&gt;</description>
    <pubDate>Tue, 03 Sep 2024 10:01:38 GMT</pubDate>
    <dc:creator>MK3</dc:creator>
    <dc:date>2024-09-03T10:01:38Z</dc:date>
    <item>
      <title>Python SDK for Splunk (JSONResultsReader) not working</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-for-Splunk-JSONResultsReader-not-working/m-p/698049#M11685</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;oneshotsearch_results = service.jobs.oneshot(searchquery_oneshot, **kwargs_oneshot)&lt;BR /&gt;reader = results.JSONResultsReader(oneshotsearch_results)&lt;/P&gt;&lt;P&gt;for item in reader:&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(isinstance(item, dict)):&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; for key in item:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if(key == '&amp;lt;...&amp;gt;'):&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A = str(item[key])&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print('A is :',A)&lt;BR /&gt;&lt;BR /&gt;The above code was working till yesterday. Now it does not enter the 1st for loop (i.e. for item in reader) anymore. I verified this by adding a print statement before the 1st if statement and it is not printing.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 10:01:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-for-Splunk-JSONResultsReader-not-working/m-p/698049#M11685</guid>
      <dc:creator>MK3</dc:creator>
      <dc:date>2024-09-03T10:01:38Z</dc:date>
    </item>
  </channel>
</rss>

