feat: Introduce robust database initialization, versioning, and seed synchronization for initial setup and updates in frozen applications.

This commit is contained in:
kiyreload27
2025-12-31 16:57:16 +00:00
parent 04a2c1bcb3
commit d7d1318a55
5 changed files with 36 additions and 15 deletions

24
main.py
View File

@@ -14,7 +14,17 @@ def run_scraper():
from scraper.gametora_scraper import run_scraper as scrape
scrape()
except Exception as e:
logging.error(f"An error occurred while running the scraper: {e}")
import traceback
error_msg = f"An error occurred while running the scraper:\n\n{e}\n\n{traceback.format_exc()}"
logging.error(error_msg)
try:
import tkinter as tk
from tkinter import messagebox
root = tk.Tk()
root.withdraw()
messagebox.showerror("Scraper Error", error_msg)
except:
pass
sys.exit(1)
def run_gui():
@@ -23,7 +33,17 @@ def run_gui():
app = MainWindow()
app.run()
except Exception as e:
logging.error(f"An error occurred while launching the GUI: {e}")
import traceback
error_msg = f"An error occurred while launching the GUI:\n\n{e}\n\n{traceback.format_exc()}"
logging.error(error_msg)
try:
import tkinter as tk
from tkinter import messagebox
root = tk.Tk()
root.withdraw()
messagebox.showerror("Application Error", error_msg)
except:
pass
sys.exit(1)
def main():