mikeshardmind / discord-scheduler

Mozilla Public License 2.0
9 stars 1 forks source link

Error if file does not exist. #1

Closed LeoCx1000 closed 1 year ago

LeoCx1000 commented 1 year ago

I added path.touch() and fixed this in my own code, but it might be worth doing that in the lib itself.

Traceback (most recent call last):
<asyncio shenanigans>
  File "...\main.py", line 37, in main
    DiscordBotScheduler(path) as scheduler,
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "...\Python311\site-packages\scheduler\scheduler.py", line 299, in __init__
    resolved_path_as_str = str(db_path.resolve(strict=True))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "...\Lib\pathlib.py", line 993, in resolve
    s = os.path.realpath(self, strict=strict)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen ntpath>", line 696, in realpath
FileNotFoundError: [WinError 2] The system cannot find the file specified: '...\\scheduler.db'