0

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

manjy
  • 109
  • 1
  • 2
  • 12
  • Did you use the example from the graphenedb docs page? – Michael Hunger May 13 '20 at 14:27
  • You should probably also not create a new driver per REST call, but one when you start up your app. You might also need to set `encrypted=True` not sure of what the config is in graphenedb – Michael Hunger May 13 '20 at 14:28
  • 2
    It won't work on free account on PythonAnywhere. It should be possible on a hacker account. It looks like non-http/https connection, so it's not available on a free account. – Filip May 14 '20 at 10:32
  • @Filip Yes this solved my query, problem was with PythonAnywhere free account not allowing the connection. I switched to Heroku free account for now and it works! thanks Filip – manjy May 27 '20 at 06:31

0 Answers0