splunk / splunk-sdk-python

Splunk Software Development Kit for Python
http://dev.splunk.com
Apache License 2.0
687 stars 369 forks source link

search.py verbose flag issue #373

Closed mrkprdo closed 2 years ago

mrkprdo commented 3 years ago

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

ashah-splunk commented 3 years ago

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 commented 2 years ago

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