Download get_errors.py from webmazta/contentai: direct link, hf CLI and curl.
- Browser
- Download file 417 Bytes
-
https://huggingface.co/spaces/webmazta/contentai/resolve/main/get_errors.py
- Command line
-
hf download hf://spaces/webmazta/contentai/get_errors.py
-
curl -L -o get_errors.py https://huggingface.co/spaces/webmazta/contentai/resolve/main/get_errors.py
417 Bytes
| import sqlite3 | |
| import app | |
| print(f"DB PATH is: {app.DB_PATH}") | |
| conn = sqlite3.connect(app.DB_PATH) | |
| conn.row_factory = sqlite3.Row | |
| c = conn.cursor() | |
| c.execute("SELECT id, url, status, mode, error FROM jobs WHERE status='failed' ORDER BY id DESC LIMIT 5") | |
| rows = c.fetchall() | |
| for r in rows: | |
| print(f"--- JOB {r['id']} ({r['mode']}) ---") | |
| print(f"URL: {r['url']}") | |
| print(f"ERROR: {r['error']}") | |
| print("") | |