From 74ca4189e2b2dcff8439e72e2763537b06c5a055 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 25 May 2024 15:46:22 -0700 Subject: [PATCH] fix --- backend/config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/config.py b/backend/config.py index 81f8afcad..ac880c869 100644 --- a/backend/config.py +++ b/backend/config.py @@ -27,6 +27,8 @@ from constants import ERROR_MESSAGES BACKEND_DIR = Path(__file__).parent # the path containing this file BASE_DIR = BACKEND_DIR.parent # the path containing the backend/ +print(BASE_DIR) + try: from dotenv import load_dotenv, find_dotenv @@ -121,7 +123,9 @@ def parse_section(section): try: - changelog_content = (BASE_DIR / "CHANGELOG.md").read_text() + with open(BASE_DIR / "CHANGELOG.md", "r") as file: + changelog_content = file.read() + except: changelog_content = (pkgutil.get_data("open_webui", "CHANGELOG.md") or b"").decode()