Hello everyone,

I am a first-time SQLalchemy user planning on using SQLalchemy on a new 
project. We already have an established postgres database (currently still 
on localhost) which I do not want to handwrite the SQLalchemy model for. So 
I am planning to use sqlacodegen. Unfortunately, sqlacodegen is giving me:

sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not 
connect to server: Connection refused
        Is the server running on host "localhost" (127.0.0.1) and accepting
        TCP/IP connections on port 5432?

My systems at work are very restrictive, but I was able to gain permissions 
to the postgres config files and edited them to allow all TCP connections. 
I restarted the postgres service and I am still experiencing this error. I 
dont understand why this is happening, because it seems to be an error 
coming from psycopg2 being called in sqlalchemy, and i have ever had any 
issues connecting to the DB with psycopg2 before. 

If anyone has any experience with sqlacodegen, any help would be much 
appreciated!!

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/bd0c54b5-8057-46eb-adec-411a79c52911n%40googlegroups.com.

Reply via email to