Expected behavior
iterate through the results and take action on.
Logs or Screenshots
If applicable, add logs or screenshots to help explain your problem.
Splunk (please complete the following information):
Version: Splunk Enterprise 9.1.1
OS: Rocky Linux 9.6
Deployment: Distributed/Clustered SH's and IDX's architecture
SDK (please complete the following information):
Version: [2.1.0 and 2.1.1]
Language Runtime Version: Python 3.12.3
OS: Ubuntu 24.04.2 LTS
Additional context
This issue is only impacting the "oneshot" type search, with "normal" type search successfully yields an iterable "reader" for reader = JSONResultsReader(result_stream).
I tried this on branch develop and it seems to work just fine, print(result) is reached, without using list(). Have you tried adjusting the: earliest=-1s to a bigger time range, like: earliest=-100s?
I tried this on branch develop and it seems to work just fine, print(result) is reached, without using list(). Have you tried adjusting the: earliest=-1s to a bigger time range, like: earliest=-100s?
Yes, this is only a sample query. All valid queries on my current setup, using oneshot query method and for loop described here do not show me results without first transforming JSONResultsReader oject to list first; other than oneshot works fine.
Activity
mateusz834 commented on Oct 3, 2025
I am not able to reproduce with:
This code successfully prints the entire result.
Could you provide us with a complete reproducer?
jerryeblades commented on Oct 3, 2025
mateusz834 commented on Oct 6, 2025
I tried this on branch develop and it seems to work just fine, print(result) is reached, without using list(). Have you tried adjusting the: earliest=-1s to a bigger time range, like: earliest=-100s?
jerryeblades commented on Oct 6, 2025
Yes, this is only a sample query. All valid queries on my current setup, using oneshot query method and for loop described here do not show me results without first transforming JSONResultsReader oject to list first; other than oneshot works fine.