File size: 477 Bytes
5111c4b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import psycopg2
import traceback

try:
    print("Attempting database connection...")
    conn = psycopg2.connect(
        "dbname=postgres user=postgres password=Lovyelias5584. "
        "host=juycnkjuzylnbruwaqmp.supabase.co port=5432 "
        "sslmode=require"
    )
    print("Connection successful!")
    conn.close()
except Exception as e:
    print(f"Connection failed!")
    print(f"Error: {str(e)}")
    print("\nTraceback:")
    traceback.print_exc()