Instal postgres sql in windows 10

Viewed 2482

I try to install the latest version of postgres sql using the latest version and the recommended set up.

However when I open the pg adming I receive this error.

Python Path: "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\python.exe"
Runtime Config File: "C:\Users\User\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'

Any help on how to fix it?

3 Answers

After trying all the other suggestions without success, it finally worked for me now, with the way suggested here: Get fatal error: server could not be contacted when running pgAdmin4. 'NoneType' object has no attribute 'value'

  1. Install the newest version of the standalone pgAdmin from https://www.pgadmin.org/download/pgadmin-4-windows/ (you can do the installation additionally to the existing bundled version, without having to remove anything before)

  2. Delete the C:\Users\your_username\AppData\Roaming\pgadmin folder

  3. (I restarted the postgres service once again)

  4. Run the new pgAdmin as Administrator - it works!

Several people report that, from then on, even the old bundled version of pgAdmin works fine!

I resolved in this way:

  • I removed PGadmin from "Application Stack Builder"
  • download last version v4 5.2 (pgAdmin 4 v5.2 (released April 22, 2021)
  • installed...
  • lunched like admin... (error as usual)
  • clean-up folder C:\Users\XXXXX\AppData\Roaming\pgadmin (opsssss)
  • lunched like admin... All ran successfully!

Using all in one PGadmin with Application Stack gave me an usual error bind to some pyton or configuration file

Alen

I had a lot of trouble launching pgAdmin. Several solutions are there.

  1. Try an older version of pgAdmin. The latest version might have unresolved issues.

  2. Go to %APPDATA% (C:\Users{{your username}}\AppData\Roaming) folder and delete the pgadmin folder and run again.

  3. go to environment variables (search environment on search bar) -> advanced, the click on Environment Variables. On System Variables click on path and set a new path for C:\Program Files\PostgreSQL\13\bin (the address might vary on your PC)

Related