The pgAdmin 4 server could not be contacted:

Viewed 1189

After downloading, I immediately got this problem. I deleted and downloaded it, ran it on behalf of the administrator. but at the same time through the console he works for him requests leave and return. I also wanted to note that at first I did a project on another computer everything worked there and the project with the code that worked with the pgAdmin 4 table, but I hardly believe in this since the server is not turned on, the program is not running. Help me please!

enter code here
Python Path: "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\python.exe"
Runtime Config File: "C:\Users\oleg\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 C:\Program Files\PostgreSQL\13\pgAdmin 4\web\pgAdmin4.py"
Traceback (most recent call last):
  File "../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'
2 Answers

I ran into this problem when I installed PostgreSQL 13 with the bundled pgAdmin 4. I managed to solve this problem by:

  1. Uninstalling PostgreSQL and all its component
  2. Reinstalling it without the pgAdmin component
  3. Installing pgAdmin separately from here: https://www.pgadmin.org/download/
  4. Clearing out the %AppData%/pgAdmin (C:\Users\myusername\AppData\Roaming\pgAdmin) folder.
Related