From 220911e4e6c117c61885853edcf2b0dfa14cdf27 Mon Sep 17 00:00:00 2001 From: Karan Jayachandra Date: Fri, 15 Nov 2024 18:11:17 +0100 Subject: Added the database file name to the path command --- src/match_up/model.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/match_up/model.py b/src/match_up/model.py index b11622d..396c188 100644 --- a/src/match_up/model.py +++ b/src/match_up/model.py @@ -47,8 +47,8 @@ class PlayerList: guest_count: dict = {1: 0, 3: 0, 5: 0} def __init__(self, csv_location=None) -> None: - with path("match_up") as p: - self.db_location = join(p, "players.db") + with path("match_up", "players.db") as p: + self.db_location = p db_file_found = True if not isfile(self.db_location): db_file_found = False @@ -60,7 +60,7 @@ class PlayerList: _init_random_database(self.session) def _init_database(self): - engine = create_engine("sqlite:///" + self.db_location) + engine = create_engine("sqlite:///" + str(self.db_location)) BASE.metadata.create_all(bind=engine) self.session = sessionmaker(bind=engine)() -- cgit v1.3.1