librelist archives

« back to archive

Problem starting server.

Problem starting server.

From:
Mahesh Lal
Date:
2012-06-21 @ 17:55
Hi,.

I am trying to write an application using Flask and Bulbs (for Neo4J).

import bulbs

from bulbs.neo4jserver import Graph, Config

from flask import Flask, request, session, g

from flask_login import LoginManager

from my_app.models.user import User


GRAPH='http://localhost:7474/db/data'
DEBUG=True

SECRET_KEY='\x08\x88y7y\xc6\xa3\x8a\xc6/\xc4\xca\x0e3\x99\xd7\xeb\x01\xe1\xac\x9b\xb4m>'
USERNAME='admin'
PASSWORD='password'

app=Flask(__name__)

from controllers import index, register, login

app.register_blueprint(index.mod)
app.register_blueprint(register.mod)
app.register_blueprint(login.mod)

app.config.from_object(__name__)

def graph_db_path():
    config = Config(GRAPH)
    graph = Graph(config)
    return graph

>>>g = graph_db_path()
>>>g.add_proxy("user", User)

if __name__ =='__main__':
    app.run()


The server refuses to start.

On removing the two lines
>>>g = graph_db_path()
>>>g.add_proxy("user", User)

the server starts without fail.


What am I doing wrong?



-- 
*-- REGARDS*
*

MAHESH LAL*
*
*

Re: [flask] Problem starting server.

From:
Simon Sapin
Date:
2012-06-21 @ 18:12
Le 21/06/2012 19:55, Mahesh Lal a écrit :
>
> The server refuses to start.
>
> On removing the two lines
>  >>>g = graph_db_path()
>  >>>g.add_proxy("user", User)
>
> the server starts without fail.

I don’t know Bulbs or Neo4j but what does "refuses to start" mean? 
(Computer programs are usually not sentient. I’m pretty sure that 
Werkzeug is not, but you never know.) Do you get a traceback? Does it 
just block?

Does your add_proxy method return? Is it supposed to?

Regards,
-- 
Simon Sapin

Re: [flask] Problem starting server.

From:
Mahesh Lal
Date:
2012-06-21 @ 18:41
Hi,

Replies inline.

On Thu, Jun 21, 2012 at 11:42 PM, Simon Sapin <simon.sapin@exyr.org> wrote:

> Le 21/06/2012 19:55, Mahesh Lal a écrit :
> >
> > The server refuses to start.
> >
> > On removing the two lines
> >  >>>g = graph_db_path()
> >  >>>g.add_proxy("user", User)
> >
> > the server starts without fail.
>
> I don’t know Bulbs or Neo4j but what does "refuses to start" mean?
> (Computer programs are usually not sentient. I’m pretty sure that
> Werkzeug is not, but you never know.) Do you get a traceback? Does it
> just block?
>
It just blocks. No response at all. Blank screen.

>
> Does your add_proxy method return? Is it supposed to?
>
The add_proxy method does return. It is something that adds a proxy to the
graph object within Bulbs.


> Regards,
> --
> Simon Sapin
>
>
>


-- 
*-- REGARDS*
*

MAHESH LAL*
*
*

Re: [flask] Problem starting server.

From:
Mahesh Lal
Date:
2012-06-21 @ 18:52
Okay - it just takes a longer time.

I was being impatient.
And didnt test it well.

Sorry for the trouble.


On Fri, Jun 22, 2012 at 12:11 AM, Mahesh Lal <mahesh.2910@gmail.com> wrote:

> Hi,
>
> Replies inline.
>
> On Thu, Jun 21, 2012 at 11:42 PM, Simon Sapin <simon.sapin@exyr.org>wrote:
>
>> Le 21/06/2012 19:55, Mahesh Lal a écrit :
>> >
>> > The server refuses to start.
>> >
>> > On removing the two lines
>> >  >>>g = graph_db_path()
>> >  >>>g.add_proxy("user", User)
>> >
>> > the server starts without fail.
>>
>> I don’t know Bulbs or Neo4j but what does "refuses to start" mean?
>> (Computer programs are usually not sentient. I’m pretty sure that
>> Werkzeug is not, but you never know.) Do you get a traceback? Does it
>> just block?
>>
> It just blocks. No response at all. Blank screen.
>
>>
>> Does your add_proxy method return? Is it supposed to?
>>
> The add_proxy method does return. It is something that adds a proxy to the
> graph object within Bulbs.
>
>
>> Regards,
>> --
>> Simon Sapin
>>
>>
>>
>
>
> --
> *-- REGARDS*
> *
>
> MAHESH LAL*
> *
> *
>
>


-- 
*-- REGARDS*
*

MAHESH LAL*
*
*