zhoupancake / starRailScanner

基于pyautogui的崩坏星穹铁道成就扫描脚本
11 stars 3 forks source link

AttributeError: module 'os' has no attribute 'mkdirs' #3

Open bamboo98 opened 3 months ago

bamboo98 commented 3 months ago

真的是pyhon3.9吗?


(starRailScanner) Z:\code_python\starRailScanner>python main.py
C:\Users\bambooc\.conda\envs\starRailScanner\lib\site-packages\fuzzywuzzy\fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
  warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
分辨率检测通过
检测到目标窗口
Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Users\bambooc\.conda\envs\starRailScanner\lib\threading.py", line 980, in _bootstrap_inner
    self.run()
  File "C:\Users\bambooc\.conda\envs\starRailScanner\lib\threading.py", line 917, in run
    self._target(*self._args, **self._kwargs)
  File "Z:\code_python\starRailScanner\main.py", line 27, in main
    getCount()
  File "Z:\code_python\starRailScanner\process.py", line 97, in getCount
    os.mkdirs(imgs_path)
AttributeError: module 'os' has no attribute 'mkdirs'
zhoupancake commented 3 months ago

果咩果咩,这个是因为写这个函数的时候已经创建好这个文件夹了,所以测试的时候就没走这个判断路径,就想当然的用了mkdirs。正确的应该是makedirs。最新的修改已经上传了