Run DataBase Automatically

I am trying to run my databse from a python file.

From this file I run my Neo4j desktop program and I open in my browser the url http://localhost:7474/browser/

However, whenever I try to execute a simple query I get

ServiceUnavailable: WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver. Please use your browsers development console to determine the root cause of the failure Common reasons include the database being unavailable, using the wrong connection URL or temporary network problems. If you have enabled encryption, ensure your browser is configured to trust the certificate Neo4j is configurated to use. WebSocket "readyState" is:3

I suppose that I have to run something before, but I do not knoe what and how to id with python

Thanks!!

Please post more details on what you mean when you say you're running your database from a python file.

In order to use Browser you have to have the bolt port open (generally 7687) which is usually only open if you run the Neo4j server process

And is there any way to run the Neo4j server process from python, by executing any code or something?
Otherwise, I know that if I click on start in the program it runs. However, I need to automatice this process.

This is my current code:

#Openning Neo4j
subprocess.call(["C:/Users/x354138/AppData/Local/Programs/Neo4j Desktop/Neo4j Desktop.exe"])
#Running
graphdb = GraphDatabase.driver(uri='bolt://localhost:7687', auth=("neo4j", "neo4j"))
session = graphdb.session()
#Opening Tab
chrome_path = 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s'
url = 'http://localhost:7687/browser/'
webbrowser.get(chrome_path).open(url)