Search code examples
pythonpostgresqlpgadminpgadmin-4

Issue installing PostgreSQL 13 on my windows 10, on running pgAdmin4 it gives Fatal Error: "The pgAdmin 4 server could not be contacted:"


I tried installing PostgreSQL 13 on my windows 10, its installed, but when running pgAdmin4.exe it returns a Fatal Error, returning a list of pgAdmin Runtime Environment variables. And throws an AttributeERROR.

<--------------------------error message----------------->

Traceback (most recent call last):

  File "C:\Program Files\PostgreSQL\13\pgAdmin 4\web\pgAdmin4.py", line 98, in <module>

    app = create_app()

  File "C:\Program Files\PostgreSQL\13\pgAdmin 4\web\pgadmin\__init__.py", line 347, in create_app

    if not os.path.exists(SQLITE_PATH) or get_version() == -1:

  File "C:\Program Files\PostgreSQL\13\pgAdmin 4\web\pgadmin\setup\db_version.py", line 19, in get_version

    return version.value
AttributeError: 'NoneType' object has no attribute 'value'

<------------------------------------------------------------>

I tried adding the /bin to System variables in environment variable also tried running pgAdmin4 as Administrator, didn't work.


Solution

  • I had this issue too. What worked for me was first uninstalling PostgreSQL, then installing the standalone pgAdmin v5 for Windows from pgadmin.org/download, and then installing PostgreSQL 13 from https://www.enterprisedb.com/downloads/postgres-postgresql-downloads.