Speedofmastery commited on
Commit
d5ce498
·
1 Parent(s): 38a3cf3

Auto-commit: app.py updated

Browse files
Files changed (1) hide show
  1. app.py +11 -4
app.py CHANGED
@@ -127,10 +127,17 @@ AI_MODELS = {
127
  }
128
 
129
  def init_database():
130
- """Initialize SQLite database for authentication"""
131
- db_path = Path("openmanus.db")
132
- conn = sqlite3.connect(db_path)
133
- cursor = conn.cursor()
 
 
 
 
 
 
 
134
 
135
  # Create users table
136
  cursor.execute("""
 
127
  }
128
 
129
  def init_database():
130
+ """Initialize SQLite database for authentication - Linux optimized"""
131
+ try:
132
+ # Use Linux-friendly paths
133
+ data_dir = Path("/home/user/app/data")
134
+ data_dir.mkdir(exist_ok=True)
135
+
136
+ db_path = data_dir / "openmanus.db"
137
+ logger.info(f"Initializing database at {db_path}")
138
+
139
+ conn = sqlite3.connect(str(db_path))
140
+ cursor = conn.cursor()
141
 
142
  # Create users table
143
  cursor.execute("""