Skip to content

SSL Certificate error #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
alfcar62 opened this issue Feb 26, 2023 · 3 comments
Open

SSL Certificate error #1

alfcar62 opened this issue Feb 26, 2023 · 3 comments

Comments

@alfcar62
Copy link

I'm a beginner of Python and MongoDB but I have tried your code and it works perfecty on local MongoDB.
If i try to access to the same database on Atlas Cloud and in tis case occurrs the error "SSL Certificate invalid".
I've tried but i don't know how to resolve it.

@yoandysse
Copy link

I'm a beginner of Python and MongoDB but I have tried your code and it works perfecty on local MongoDB.

If i try to access to the same database on Atlas Cloud and in tis case occurrs the error "SSL Certificate invalid".

I've tried but i don't know how to resolve it.

Hi, are you using Mac or Windows? If you are using Mac after the installation of Python on your system you must execute the code "Install Certificate.comand" is inside the installation folder, otherwise any connection that uses SSL will generate an error.

1 similar comment
@yoandysse
Copy link

I'm a beginner of Python and MongoDB but I have tried your code and it works perfecty on local MongoDB.

If i try to access to the same database on Atlas Cloud and in tis case occurrs the error "SSL Certificate invalid".

I've tried but i don't know how to resolve it.

Hi, are you using Mac or Windows? If you are using Mac after the installation of Python on your system you must execute the code "Install Certificate.comand" is inside the installation folder, otherwise any connection that uses SSL will generate an error.

@rubik12023
Copy link

I got the same issue.

I have solved: change main.py
import ssl

app.mongodb_client = MongoClient(config["ATLAS_URI"], ssl=True, ssl_cert_reqs=ssl.CERT_NONE)
app.database = app.mongodb_client[config["DB_NAME"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants