while running python program using streamsets python sdk we are getting error
File "/var/lib/jenkins/.local/lib/python3.8/site-packages/streamsets/sdk/exceptions.py", line 5, in <module> from requests.exceptions import HTTPError, JSONDecodeError ImportError: cannot import name 'JSONDecodeError' from 'requests.exceptions'
we have found solution for this but we want to know why we are getting this error.
Solution for this is manually we are replacing line “from requests.exceptions import HTTPError, JSONDecodeError” with
“from json import JSONDecodeError”
Page 1 / 1
I have seen this problem when ‘requests’ is outdated. It looks like JSONDecodeError was added in requests 2.27.0. Update your requests package to see the proper error message.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.