且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ValueError:无法配置处理程序“文件":[Errno 2] 没有这样的文件或目录:

更新时间:2023-02-23 08:49:57

由于某种原因(/Users/deon/Documents/PyCharmProjects/Developments/deonproject/log),您没有日志文件的路径.确保所有目录都存在(如果不存在,则创建它们)并创建一个空的 debug.log 日志文件(以防万一).

You do not have path to a log file for some reason (/Users/deon/Documents/PyCharmProjects/Developments/deonproject/log). Make sure that all directories exist (if no, create them) and create an empty debug.log log file (just in case).

发生的情况是您的代码发生了一些问题.处理程序捕获此错误以将其保存到您的日志文件中,以便您可以分析它.但是,它试图打开的日志文件的路径不存在.因此,在处理另一个异常时会发生异常.

What happens is there is some problem with your code happening. Handler catches this error to save it to your log file so that you can analyze it. However, the path to log file it is trying to open does not exist. Thus, exception occures during handling of another exception.