JWT: 'module' object has no attribute 'encode'

前端 未结 7 806
伪装坚强ぢ
伪装坚强ぢ 2021-02-04 23:18

I am getting a Module not found error when using jwt. Here is how I declared it:

def create_jwt_token():
    payload = {
        \"iat\": int(time.time(         


        
7条回答
  •  梦毁少年i
    2021-02-04 23:33

    You can use the PyJWT package, where jwt.encode() works fine (no need for initialization or other kinds of stuff).

提交回复
热议问题