Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PgAdmin4 - 'NoneType' object has no attribute 'value'

I used to have a functioning PostgreSQL database, but upon reinstalling due to computer issues, I am now getting this error after launching:

  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'```
like image 862
joshiki Avatar asked May 16 '21 17:05

joshiki


1 Answers

As this reply recommends, I removed described file (C:\Users{User name}\AppData\Roaming\pgadmin\pgadmin4.db on Windows), added user environment varible SQLITE_PATH = 'C:\Users{User name}\AppData\Roaming\pgadmin\pgadmin4.db' and launched pgAdmin. Worked for me.

like image 101
Walrus94 Avatar answered Oct 07 '22 17:10

Walrus94