8000 cannot automatically create directory deeper than 1 · Issue #2 · StKali/cache3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
cannot automatically create directory deeper than 1 #2
Closed
@EnderHane

Description

@EnderHane
import cache3
cache3.DiskCache(directory='.cache3/deeper_dir')

leads to FileNotFoundError if ".cache3" does not exist

Traceback
 
Traceback (most recent call last):
  File "C:\Users\u\PycharmProjects\test\main.py", line 2, in 
    cache3.DiskCache(directory='.cache3/cache3')
  File "C:\Users\u\AppData\Local\pypoetry\Cache\virtualenvs\xxx\lib\site-packages\cache3\disk.py", line 194, in __init__
    self.directory: Path = directory
  File "C:\Users\u\AppData\Local\pypoetry\Cache\virtualenvs\xxx\lib\site-packages\cache3\validate.py", line 22, in __set__
    validate_value: Any = self.validate(value)
  File "C:\Users\u\AppData\Local\pypoetry\Cache\virtualenvs\xxx\lib\site-packages\cache3\validate.py", line 100, in validate
    path.mkdir()
  File "C:\Users\u\AppData\Local\Programs\Python\Python310\lib\pathlib.py", line 1175, in mkdir
    self._accessor.mkdir(self, mode)
FileNotFoundError: [WinError 3] 系统找不到指定的路径。: 'C:\\Users\\u\\PycharmProjects\\test\\.cache3\\cache3'
  

Windows 22621.521
Python 3.10.7
cache3 0.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0