CI360 DISCOVER Download API (V0.9) - last updated 23 Mar 2020Traceback (most recent call last):
File "discover.py", line 949, in <module>
headers = {'authorization': "Bearer "+bytes.decode(token),'cache-control': "no-cache"}
TypeError: descriptor 'decode' for 'bytes' objects doesn't apply to a 'str' object
Not sure whether you want to test the type to accommodate earlier versions of PyJwt, but the simple fix is changing the line to:
headers = {'authorization': "Bearer "+ token,'cache-control': "no-cache"}
There's an error on line 949 of discover.py:
In the latest version of PyJwt module, the return type of jwt.encode has changed to a str type instead of bytes. See changelog here: https://pyjwt.readthedocs.io/en/latest/changelog.html#improve-typings.
Not sure whether you want to test the type to accommodate earlier versions of PyJwt, but the simple fix is changing the line to:
headers = {'authorization': "Bearer "+ token,'cache-control': "no-cache"}