zfjdhj / mimikkoAutoSignV4

暂时可用
GNU General Public License v3.0
13 stars 4 forks source link

log文件夹并没有被创建 #8

Closed LiarOnce closed 7 months ago

LiarOnce commented 7 months ago

在Python 3.10以上的版本没有创建log文件夹导致输出以下报错:

Traceback (most recent call last):
  File "d:\Git\mimikkoAutoSignV4\main.py", line 42, in <module>
    from task.task_travel import task_travel
  File "d:\Git\mimikkoAutoSignV4\task\task_travel.py", line 9, in <module>
    travel_log = Logger(
  File "d:\Git\mimikkoAutoSignV4\util\logger.py", line 50, in __init__
    fh = logging.FileHandler(filename=filename, encoding="utf-8")
  File "C:\Users\qq106\AppData\Local\Programs\Python\Python310\lib\logging\__init__.py", line 1169, in __init__
    StreamHandler.__init__(self, self._open())
  File "C:\Users\qq106\AppData\Local\Programs\Python\Python310\lib\logging\__init__.py", line 1201, in _open
    return open_func(self.baseFilename, self.mode,
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\Git\\mimikkoAutoSignV4\\log\\travel.log'
zfjdhj commented 7 months ago

那就先手动创建一下log目录,等我后续修复