Skip to content

Commit

Permalink
fix: sqlite3.OperationalError: unable to open database file
Browse files Browse the repository at this point in the history
  • Loading branch information
ekkx committed Aug 28, 2024
1 parent 18dd564 commit cd7402b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion yaylib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
__author__ = "ekkx"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2023 ekkx"
__version__ = "1.5.0"
__version__ = "1.5.0.dev1"

from .client import Client
from .constants import *
Expand Down
6 changes: 3 additions & 3 deletions yaylib/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,15 +274,15 @@ def __init__(
self.thread = ThreadApi(self)
self.user = UserApi(self)

if not os.path.exists(base_path):
os.makedirs(base_path)

self.__state = state or State(storage_path=base_path + "secret.db")
self.__header_manager = HeaderManager(Device.create(), self.__state)
self.__ratelimit = RateLimit(wait_on_ratelimit, max_ratelimit_retries)

self.logger = logging.getLogger("yaylib version: " + __version__)

if not os.path.exists(base_path):
os.makedirs(base_path)

ch = logging.StreamHandler()
ch.setLevel(loglevel)
ch.setFormatter(CustomFormatter())
Expand Down

0 comments on commit cd7402b

Please sign in to comment.