Opening postgres connection in psycopg2 causes python to crash

I get the following error when trying to open a connection to a postgres database. This may be due to OpenSSL, but I cannot understand the error message. Can anyone help?

>>> import psycopg2 >>> conn = psycopg2.connect(host = '', port = , dbname = '', user = '', password = '') Auto configuration failed 12848:error:02001015:system library:fopen:Is a directory:.\crypto\bio\bss_file.c :169:fopen('D:/Build/OpenSSL/openssl-1.0.1h-vc9-x64/ssl/openssl.cnf','rb') 12848:error:2006D002:BIO routines:BIO_new_file:system lib:.\crypto\bio\bss_file. c:174: 12848:error:0E078002:configuration file routines:DEF_LOAD:system lib:.\crypto\co nf\conf_def.c:199: 
+6
source share
1 answer

One of the problems I can think of is that your installation may not have been linked / properly built to use openssl. If you haven’t tried the packages listed in the docs yet, maybe you can try.

When I look at the docs :

Microsoft Windows:

Jason Erickson supports the packaged Windows Psycopg port with an executable installation file. Download. Double click. Done.

So, you can try installing it there. Or you can try windows convenient for use in Windows (note: I have not tried it myself ) psycopg2-windows .

+2
source

Source: https://habr.com/ru/post/975310/


All Articles