I am using pyjwt library for decoding the JWT token. I got this error when I am decoding. The code was given in the documantation.
import jwt encoded_jwt=\'
For me, there were spaces in the key (silly IDE) which caused this issue, make sure that's not the case with you