Python 中改变和获取当前工作目录
import os
os.chdir("目标目录") #修改当前工作目录
os.getcwd() #获取当前工作目录
Debug1:
FileNotFoundError: [WinError 3] 系统找不到指定的路径。: 'trainingDigits'
解决方法:
将下载的源数据中的trainingDigits文件添加到工作空间位置
Debug2:
TypeError: not all arguments converted during string formatting
解决方法:
将print("\nthe total error rate is :%f" % (errorCount/float(mTest)))中的&改为%。