'MongoDB python connection

I just upgraded my mongoDB subscription and suddenly I get this error everytime I try to connect: -shard-00-02.dlu0y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for '-shard-00-02.dlu0y.mongodb.net

Does anyone know what is the problem? It worked perfectly fine before.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source