![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
test tools
veryly
这个作者很懒,什么都没留下…
展开
-
python实现base64编码与解码。报错TypeError: a bytes-like object is required, not ‘str‘
今天在用base64转码时,报错,提示:TypeError: a bytes-like object is required, not 'str’如下图报错原因:python2和python3对套接字返回值解码上有区别处理方法:解决办法非常的简单,只需要用上python的bytes和str两种类型转换的函数encode()、decode()即可!str通过encode()方法可以编码为指定的bytes;反过来,要把bytes变为str,就需要用decode()方法.(比如我们从网络或磁盘上读取了字节原创 2021-04-09 15:24:45 · 2343 阅读 · 0 评论 -
WARNING: The script locust.exe is installed in ‘C:\Users\liuyuan39\AppData\Roaming\Python\Python38\
用pip安装python包-locust包的时候报错:提示: WARNING: The script locust.exe is installed in ‘C:\Users\liuyuan39\AppData\Roaming\Python\Python38\Scripts’ which is not on PATH.就是说这个’C:\Users\liuyuan39\AppData\Roaming\Python\Python38\Scripts’ 路径没有写到path里,如果不处理很有可能导入不了包。原创 2021-04-02 15:38:17 · 6547 阅读 · 1 评论