python提示错误TypeError: write() argument must be str, not bytes

还是在学习《Machine Learning in Action》中决策树一章中,在学习决策树存储过程中先是提示错误TypeError: write() argument must be str, not bytes,看错误信息是说write()函数的参数必须为str,而不是字节bytes。不明白,看源码哪里提示错误了,pickle.dump(inputTree,fw)这一条语句编译时出错了,那么
相关文章
相关标签/搜索