Spaces:
Build error
Build error
Upload Home.py
Browse files
Home.py
CHANGED
@@ -516,7 +516,7 @@ def reset_project_text_box():
|
|
516 |
def query_excecuter_sqlite(
|
517 |
insert_projects_query,
|
518 |
insert_meta_data_query,
|
519 |
-
db_path=
|
520 |
params_projects=None,
|
521 |
params_meta=None,
|
522 |
):
|
@@ -534,8 +534,13 @@ def query_excecuter_sqlite(
|
|
534 |
bool: True if successful, False otherwise.
|
535 |
"""
|
536 |
try:
|
|
|
|
|
|
|
|
|
|
|
537 |
# Establish connection to the SQLite database
|
538 |
-
conn = sqlite3.connect(
|
539 |
cursor = conn.cursor()
|
540 |
|
541 |
# Execute the first insert query into the mmo_projects table
|
|
|
516 |
def query_excecuter_sqlite(
|
517 |
insert_projects_query,
|
518 |
insert_meta_data_query,
|
519 |
+
db_path=None,
|
520 |
params_projects=None,
|
521 |
params_meta=None,
|
522 |
):
|
|
|
534 |
bool: True if successful, False otherwise.
|
535 |
"""
|
536 |
try:
|
537 |
+
# Construct a cross-platform path to the database
|
538 |
+
db_dir = os.path.join("db")
|
539 |
+
os.makedirs(db_dir, exist_ok=True) # Make sure the directory exists
|
540 |
+
db_path = os.path.join(db_dir, "imp_db.db")
|
541 |
+
|
542 |
# Establish connection to the SQLite database
|
543 |
+
conn = sqlite3.connect(db_path)
|
544 |
cursor = conn.cursor()
|
545 |
|
546 |
# Execute the first insert query into the mmo_projects table
|