报错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这个函数只有在往文件写内容时才会生成文件,如果没有写入内容则不会创建文件
原文地址:https://www.cnblogs.com/Milky22/p/7789233.html