Update utils/database.py
Browse files- utils/database.py +1 -6
utils/database.py
CHANGED
|
@@ -30,15 +30,10 @@ def create_connection(db_file):
|
|
| 30 |
"""Create a database connection to the SQLite database."""
|
| 31 |
conn = None
|
| 32 |
try:
|
| 33 |
-
st.error(f"Attempting to connect to database at: {db_file}")
|
| 34 |
conn = sqlite3.connect(db_file)
|
| 35 |
-
st.error("Database connection successful!")
|
| 36 |
return conn
|
| 37 |
except Error as e:
|
| 38 |
-
st.error(
|
| 39 |
-
st.error(f"Error type: {type(e)}")
|
| 40 |
-
import traceback
|
| 41 |
-
st.error(f"Detailed error: {traceback.format_exc()}")
|
| 42 |
return None
|
| 43 |
|
| 44 |
def create_tables(conn):
|
|
|
|
| 30 |
"""Create a database connection to the SQLite database."""
|
| 31 |
conn = None
|
| 32 |
try:
|
|
|
|
| 33 |
conn = sqlite3.connect(db_file)
|
|
|
|
| 34 |
return conn
|
| 35 |
except Error as e:
|
| 36 |
+
st.error("Failed to connect to database. Please try again or contact support.")
|
|
|
|
|
|
|
|
|
|
| 37 |
return None
|
| 38 |
|
| 39 |
def create_tables(conn):
|