Failing postgres connection

Trying to connect cloud database, but it is failing,

It is resloved now. I found another thread with info psycopg2 was missing on venv, prodigy does not add as part of requirement but that’s fine. I guess need to go into doc, unless I missed it. :slight_smile:

Coming to second issue,

File "D:\Env\Python\VEnv\lib\site-packages\psycopg2\", line 130, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
peewee.OperationalError: FATAL:  no pg_hba.conf entry for host "**********", user "**************", database "*****************", SSL on
FATAL:  SSL connection is required. Please specify SSL options and retry.

How to enable SSL?

This is something that’d have to happen in your database driver settings and configuration. I’m no psycopg2 / PostgreSQL expert, but I found this thread on Stack Overflow which mentions the sslmode='require' connection parameter.

So maybe try adding "sslmode": "require" to your "postgresql" config?

Does not solve the problem.

Maybe one of these threads helps?

If you test it, you might find it easier to connect with peewee directly, which is what Prodigy uses under the hood. None of the database connection stuff is really specific to Prodigy.

Thanks Ines, I will try and update the forum.

1 Like