Python unable to connect

I am trying to access the server from the python driver, but I keep getting “unable to connect to server”. I’m using a mac m1.

Welcome to the MongoDB Community @Aditya_Bhatia !

Please provide some more details about your environment:

  • Type of deployment you are trying to connect to (standalone, replica set, sharded cluster)
  • version of PyMongo used
  • version of MongoDB server
  • is this a self-hosted deployment or a managed service like MongoDB Atlas?
  • example of your MongoClient connection set up (with any private credentials like username/password/hostnames replaced with placeholders)

You may also find some helpful resources via Error: couldn't connect to server - #16 by Stennie.