welcome to my blog
错误信息
使用python的pickle模块加载pickle文件报错: TypeError: a bytes-like object is required, not ‘str’
错误代码如下
with open('train_id.pickle', 'r') as f:
pickle.load(file=f)
原因
python3中pickle模块的方法细节有变化, 比如pickle.loa
使用python的pickle模块加载pickle文件报错: TypeError: a bytes-like object is required, not ‘str’
错误代码如下
with open('train_id.pickle', 'r') as f:
pickle.load(file=f)
python3中pickle模块的方法细节有变化, 比如pickle.loa