close

[Solved] PgAdmin4 – ‘NoneType’ object has no attribute ‘value’

Hello Guys, How are you all? Hope You all Are Fine. Today I have fresh installed postgresql pgAdmin4 in my windows PC When I run pgAdmin 4 I get a “fatal error: server could not be contacted” in postgresql. So Here I am Explain to you all the possible solutions here.

Without Wasting your time, Lets start This Article to Solve This Error.

How PgAdmin4 – ‘NoneType’ object has no attribute ‘value’ Error Occurs ?

Today I have fresh installed postgresql pgAdmin4 in my windows PC When I run pgAdmin 4 I get a “fatal error: server could not be contacted” in postgresql

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'

How To Solve PgAdmin4 – ‘NoneType’ object has no attribute ‘value’ Error ?

Question: How To Solve PgAdmin4 – ‘NoneType’ object has no attribute ‘value’ Error ?
Answer: I found one of the Temporary solution you can run “pgAdmin 4” app using python. First of all delete C:\Users\username\AppData\Roaming\pgadmin. Open terminal. Run C:\Program Files\PostgreSQL\12\pgAdmin 4\web\pgAdmin4.py file using python Run as administrator the “pgAdmin 4” app from the windows menu and it will work as expected.

Solution 1

I performed the same steps and ran into the same problem. I found that the problem was resolved by removing the ~/.pgadmin directory (created during installation) and then re-running “python pgAdmin4.py”

Solution 2

This is pgAdmin Bug. It appears this is a widespread bug that has been reported on the pgAdmin bug list. The standalone pgAdmin can be installed without the same issues from pgadmin.org/download.

Solution 3

I found one of the Temporary solution you can run “pgAdmin 4” app using python.

  1. First of all delete C:\Users\username\AppData\Roaming\pgadmin.
  2. Open terminal.
  3. Run C:\Program Files\PostgreSQL\12\pgAdmin 4\web\pgAdmin4.py file using python
  4. Run as administrator the “pgAdmin 4” app from the windows menu and it will work as expected.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also Read

Please Rate Our Solution to Motivate Us For Give Our Best

Leave a Comment