Pymongo [Errno 11001] No address found

So I've been developing an application and have been using mongoDB and pymongo for all my DB needs. I took a break from developing for about a week and came back today and found that my DB API calls were timing out and return this stacktrace. I searched the internet for similar errors but could not find anything. One post that was kind of similar said that if you add "connect=False" to your mongo client initialization statement, it might work. I tried that, but it didn't work. I then turned on my vpn, Private Internet Access, to see if that could somehow change my outcome. After enabling the vpn, I recompiled my python code but had the same result. I then disabled the vpn, recompiled, and it somehow worked. It makes no sense. I go change the mongo client host name for testing, and it stops working again. So as of right now, the only way I can get any of my DB API calls to work is to turn on my vpn, turn it back off and recompile. I have no idea why this is happening since it worked perfectly 7 days ago. I tried the code on two machines and got the same problem, but I had a friend on a different network try it and it worked perfectly fine. This means it could be a problem with my network but I have no leads. If anyone why this is happening?