splunk-sdk-python icon indicating copy to clipboard operation
splunk-sdk-python copied to clipboard

search.py verbose flag issue

Open mrkprdo opened this issue 5 years ago • 2 comments

I do understand there are still ongoing works to migrate python2 to python3 Just wanted to document examples/search.py

Traceback (most recent call last):
  File "splunk-sdk-python\examples\search.py", line 118, in <module>
    main(sys.argv[1:])
  File "splunk-sdk-python\examples\search.py", line 96, in main
    if verbose > 0:
TypeError: '>' not supported between instances of 'str' and 'int'

This can be interpreted to:

if bool(verbose) > 0:
    ...

bool() defninition

mrkprdo avatar Apr 05 '21 16:04 mrkprdo

Hi @mrkprdo , we tried executing the example mentioned and it worked fine in both the scenarios with and without the verbose flag for both python2 and python3 . We would request you to use the latest version of the SDK and let us know if you face the same error. Thanks

ashah-splunk avatar Sep 22 '21 14:09 ashah-splunk

@mrkprdo Closing this issue due to no response on it. Please reopen if this is still an issue.

ashah-splunk avatar Oct 18 '21 16:10 ashah-splunk