from pymongo import MongoClient uri = "mongodb+srv://soham:Soham2001@potholedetection.gt3rb.mongodb.net/?retryWrites=true&w=majority&appName=potholeDetection" try: client = MongoClient(uri) db = client.admin # Use the "admin" database for the ping command result = db.command("ping") print("Ping successful:", result) except Exception as e: print("Ping failed:", e)