When I try following code: import sqlalchemyĭb = sqlalchemy.create_engine('postgresql:///tutorial.db')įile "C:\Python27\lib\site-packages\sqlalchemy-0.7.5dev-py2.7.egg\sqlalchemy\engine_init_.py", line 327, in create_engineįile "C:\Python27\lib\site-packages\sqlalchemy-0.7.5dev-py2.7.egg\sqlalchemy\engine\strategies.py", line 64, in createįile "C:\Python27\lib\site-packages\sqlalchemy-0.7.5dev-py2.7.egg\sqlalchemy\dialects\postgresql\psycopg2. What is happening here when I try to connect to postgresql? I am self learner in this field of database and programming so please be gentle with me. ![]() It was designed for heavily multi-threaded applications, is written in C and focusses on effective and secure communication. This is done with the psycopg2 connect() function, which creates a. host all all 0.0.0. Psycopg2 is a PostgreSQL database adapter written for Python. In order to use Python to interact with a PostgreSQL database, we need to make a connection. Add lines in the config file to allow connection. I know this might be really a simple question but I don't know the solution. I think the problem is TCP connection is not enabled and have to modify your nf file to allow the connection. IljaEverilä I am assuming the server does not accept connections on the Postgres port 5432 since, when I use it, there is a short pause and then I get the message: : (psycopg2.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |