Skip to content
Advertisement

Tag: connection

How to bypass the message-“your connection is not private” on non-secure page using Selenium?

I’m trying to interact with the page “Your connection is not private”. The solution of using options.add_argument(‘–ignore-certificate-errors’) is not helpful for two reasons: I’m using an already open window. Even if I was using a “selenium opened window” the script runs non stop, and the issue I’m trying to solve is when my browser disconnects from a splunk dashboard and

MySQL error in Python – cannot connect to MySQL server

I have a question: My input: And this is the output: mysql.connector.errors.NotSupportedError: Authentication plugin ‘caching_sha2_password’ is not supported Answer Install the Python MySQL driver: Official document Similar Stack Overflow question Just make sure to install the correct connector based on your operating system, MySQL version and the Python version you use:

MongoEngine: Close connection

I spent ages trying to find a simple example where MongoEngine was being used and a connection was being closed. Finally figured it out and posting my code. Answer I know this is an old question, but if anyone else is searching I figured I’d give an alternate answer. close() does not actually remove the connection from MongoEngine’s connection list.

Making sure that psycopg2 database connection alive

I have a python application that opens a database connection that can hang online for an hours, but sometimes the database server reboots and while python still have the connection it won’t work with OperationalError exception. So I’m looking for any reliable method to “ping” the database and know that connection is alive. I’ve checked a psycopg2 documentation but can’t

Advertisement