Bytes message argument error

前端 未结 3 1668
我寻月下人不归
我寻月下人不归 2021-01-18 01:25

I can\'t figure out what the \'bytes\' method is complaining about. In the code below, i am trying to generate an authentication key for my client and i keep getting this er

3条回答
  •  我在风中等你
    2021-01-18 02:11

    The likely reason you encountered this problem is the code you were using was written for Python 3.x and you executed it under Python 2.x.

    I know someone has already partially stated this, but I thought it might be helpful to make it clearer to people new to Python who may not realize why the 'utf-8' argument was being used as the person asking the question noted that they did not know what the argument was for.

    Anyone who comes here may find that useful in understanding why there was an argument of 'utf-8'.

提交回复
热议问题