2 yzlll yzlll 于 2017.09.08 15:49 提问

python 调用Crypto报错

Traceback (most recent call last):
File "f:\pythonproject\webservice\test\aesClass.py", line 18, in
print('Python encrypt: ' + base64.b64encode(encrypt_token('dmyz.org')))
TypeError: Can't convert 'bytes' object to str implicitly

1个回答

oyljerry
oyljerry   Ds   Rxr 2017.09.08 15:58

encrypt_token返回的是不是bytes,你需要自己转换成str

Csdn user default icon
上传中...
上传图片
插入图片