Probably not. The error message seems to indicate that you are not using the cluster address correctly. What is the connection string that you are using?
A cluster has no IP address. A cluster is a group of hosts. The SRV and TXT DNS records of the cluster resolves to hosts. In your case it is:
id 64218
opcode QUERY
rcode NOERROR
flags QR RD RA
;QUESTION
pfe.ggfaafp.mongodb.net. IN ANY
;ANSWER
pfe.ggfaafp.mongodb.net. 60 IN TXT "authSource=admin&replicaSet=atlas-frynfj-shard-0"
pfe.ggfaafp.mongodb.net. 60 IN SRV 0 0 27017 ac-85mukat-shard-00-00.ggfaafp.mongodb.net.
pfe.ggfaafp.mongodb.net. 60 IN SRV 0 0 27017 ac-85mukat-shard-00-01.ggfaafp.mongodb.net.
pfe.ggfaafp.mongodb.net. 60 IN SRV 0 0 27017 ac-85mukat-shard-00-02.ggfaafp.mongodb.net.
;AUTHORITY
;ADDITIONAL
Well,
When i use it in MongoDB Compass it works totally fine and it shows my databases.
But when i use it in my python script and try to connect to my Mongo database i got the error above: No address associated with hostname
I don’t know if this would help or not but when i try to ping to the hostname i got : No address associated with host name
Not a host name, means not a host, means no IP address, means not ping-able. However you may ping any of the 3 hosts refered in the SRV records I shared before.
2 things could explain why it does not work in your python.
1 - may be python does not like the double quotes around the connection string
2 - you might be missing a module that knows how resolve SRV records