4

After installing postgres 13, pgadmin4 cannot launch and this error occur :

The pgAdmin 4 server could not be contacted:

Already tried :

  • Run as administrator
  • Adding file://C:\Program Files\PostgreSQL\13\bin to path variable
  • Cleaning Appdata\roaming\pgadmin
  • Restarting computer

The error is still here; here is some details :

 pgAdmin Runtime Environment
--------------------------------------------------------
Python Path: "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\python.exe"
Runtime Config File: "C:\Users\DZ001160\AppData\Roaming\pgadmin\runtime_config.json"
pgAdmin Config File: "C:\Program Files\PostgreSQL\13\pgAdmin 4\web\config.py"
Webapp Path: "C:\Program Files\PostgreSQL\13\pgAdmin 4\web\pgAdmin4.py"
pgAdmin Command: "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\python.exe -s C:\Program Files\PostgreSQL\13\pgAdmin 4\web\pgAdmin4.py"
Environment: 
  - ALLUSERSPROFILE: C:\ProgramData
  - APPDATA: C:\Users\DZ001160\AppData\Roaming
  - ChocolateyInstall: C:\ProgramData\chocolatey
  - CHROME_CRASHPAD_PIPE_NAME: \\.\pipe\crashpad_4904_QRCYSGHVOIEQKPFC
  - CHROME_RESTART: NW.js|NW.js est bloqué. Voulez-vous le relancer maintenant ?|LEFT_TO_RIGHT
  - CommonProgramFiles: C:\Program Files\Common Files
  - CommonProgramFiles(x86): C:\Program Files (x86)\Common Files
  - CommonProgramW6432: C:\Program Files\Common Files
  - COMPUTERNAME: W10-PC0L10T3
  - ComSpec: C:\WINDOWS\system32\cmd.exe
  - DominoAddress: fr-algapppwv001.fr.ema.ad.pwcinternal.com
  - DominoName: DZ-ALGAPP000/DZ/Server/PwC
  - DriverData: C:\Windows\System32\Drivers\DriverData
  - HOMEDRIVE: C:
  - HOMEPATH: \Users\DZ001160
  - LOCALAPPDATA: C:\Users\DZ001160\AppData\Local
  - LOGONSERVER: \\FR-PARDIR002
  - NUMBER_OF_PROCESSORS: 4
  - NVM_HOME: C:\Users\DZ001160-ladm\AppData\Roaming\nvm
  - NVM_SYMLINK: C:\Program Files\nodejs
  - OneDrive: C:\Users\DZ001160\OneDrive
  - OPENSSL_CONF: C:\Program Files\PostgreSQL\psqlODBC\etc\openssl.cnf
  - OS: Windows_NT
  - Path: C:\Program Files (x86)\Zulu\zulu-8-jre\bin\;C:\Program Files\Zulu\zulu-8-jre\bin\;C:\Python39\Scripts\;C:\Python39\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\IBM\Notes\;C:\Program Files (x86)\ConfigMgr 2012 Toolkit R2\ClientTools;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\ProgramData\chocolatey\bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Users\DZ001160-ladm\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\nodejs\;C:\Users\DZ001160\AppData\Local\Microsoft\WindowsApps;C:\Users\DZ001160\AppData\Local\Programs\Git\cmd;C:\Users\DZ001160\AppData\Local\Gource\cmd;C:\Users\DZ001160\AppData\Roaming\npm
  - PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW
  - PGADMIN_INT_KEY: 446e590b-3ac8-45a1-9d95-611e127071b0
  - PGADMIN_INT_PORT: 53846
  - PGADMIN_SERVER_MODE: OFF
  - POSTGRES: C:\Program Files\PostgreSQL\13\bin
  - PROCESSOR_ARCHITECTURE: AMD64
  - PROCESSOR_IDENTIFIER: Intel64 Family 6 Model 78 Stepping 3, GenuineIntel
  - PROCESSOR_LEVEL: 6
  - PROCESSOR_REVISION: 4e03
  - ProgramData: C:\ProgramData
  - ProgramFiles: C:\Program Files
  - ProgramFiles(x86): C:\Program Files (x86)
  - ProgramW6432: C:\Program Files
  - PROJ_LIB: C:\Program Files\PostgreSQL\13\share\contrib\postgis-3.1\proj
  - PSModulePath: C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Thycotic\Powershell\
  - PUBLIC: C:\Users\Public
  - SESSIONNAME: Console
  - SystemDrive: C:
  - SystemRoot: C:\WINDOWS
  - TEMP: C:\Users\DZ001160\AppData\Local\Temp
  - TMP: C:\Users\DZ001160\AppData\Local\Temp
  - UATDATA: C:\WINDOWS\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77
  - USERDNSDOMAIN: FR.EMA.AD.PWCINTERNAL.COM
  - USERDOMAIN: FR
  - USERDOMAIN_ROAMINGPROFILE: FR
  - USERNAME: DZ001160
  - USERPROFILE: C:\Users\DZ001160
  - windir: C:\WINDOWS
--------------------------------------------------------

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'
1
  • I am facing same problem, tried every thing mentioned above. still its same error. Commented May 19, 2021 at 6:41

3 Answers 3

3

The solution work for me:

Sign up to request clarification or add additional context in comments.

2 Comments

Indeed. unchecking Pgadmin in the postgres installation and installing it separately resolve the problem. Thanks a lot.
I did also all of this and think finally the Windows reboot solved it, but that was only part of the question, not of the answer. Maybe this is crucial especially in connection with the change of the PATH?
0

I have same the failure. I can't seem to make pgAdmin 4 work. I installed PostgreSQL on a different laptop, pdAdmin 4 comes up, but then there was a different failure.

Comments

0

For those who get error on MacOS, new version of pgAdmin cannot connect to database on old pgAdmin. Workarount for me is just rename folder ~/.pgadmin to something else. Then the new PgAdmin will start successfully.

Note1: use Command + Shift + . shortcut key to show the hidden folder.

Note2: remove ~/.pgadmin result to lose old database connections.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.