报错WindowsError: [Error 3]

today_report_path = os.paht.join(report_path, today)
if not os.path.isdir(today_report_path):
os.mkdir(today_report_path)
在这行代码中报错,但单独执行该文件又没问题
查了下应该是os.path.join这个函数只有在往文件写内容时才会生成文件,如果没有写入内容则不会创建文件
posted @ 2017-11-05 22:46  Milky  阅读(1171)  评论(0编辑  收藏  举报