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

前端 未结 7 803
伪装坚强ぢ
伪装坚强ぢ 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条回答
  •  醉话见心
    2021-02-04 23:48

    Apart from (re)installing the PyJWT dependency through pip which other answers already mention make sure following files are not in the current directory (i.e. pwd) you're either running python in or your .py script:

    jwt.py
    token.py
    

提交回复
热议问题