I am unable to connect to Neo4j on graphenedb through pythonanywhere

Ok so i have a free instance of Neo4j on graphenedb, and my code is hosted on a free instance for pythonanywhere. I am a student and doing for experiment so didn't buy paid versions.
Basically whenever i try to access graphenedb neo4j through pythonanywhere i get internal server error 500.
I am using neo4j-driver, and here is a snippet

from neo4j import GraphDatabase, basic_auth

@app.route('/login', methods =['GET','POST'])
def login():
    user = 'xyz'
    passw ='xyzxyz'
    gdb1 =  GraphDatabase.driver(bolt_url, auth=basic_auth(usr_nm_db, pswrd_db))

i am getting error on this last line . Unable to connect.
this is the error : neobolt.exceptions.ServiceUnavailable: Failed to establish connection to ('34.229.164.223', 24787) (reason [Errno 111] Connection refused)
Can anyone please help

Can you provide the actual route you're using to log in? If you're not using bolt and instead making an http request it's not going to work.

hello, sorry for the late reply. Turns out problem was with PythonAnywhere free account, due to some restrictions in free accounts it wasnt possible to connect with GrapheneDb database.