When I try to start pgadmin it always show sqlalchemy error . I am using latest version of pgadmin and on windows Tried using older version but all have same problem
Here is tracebook of error
pgAdmin Runtime Environment
--------------------------------------------------------
Python Path: "C:\Users\rishu\Downloads\v5\python\python.exe"
Runtime Config File: "C:\Users\rishu\AppData\Roaming\pgadmin\runtime_config.json"
pgAdmin Config File: "C:\Users\rishu\Downloads\v5\web\config.py"
Webapp Path: "C:\Users\rishu\Downloads\v5\web\pgAdmin4.py"
pgAdmin Command: "C:\Users\rishu\Downloads\v5\python\python.exe -s C:\Users\rishu\Downloads\v5\web\pgAdmin4.py"
Environment:
- ALLUSERSPROFILE: C:\ProgramData
- APPDATA: C:\Users\rishu\AppData\Roaming
- CHROME_CRASHPAD_PIPE_NAME: \\.\pipe\crashpad_1536_DOVQUCMVUYAPISQG
- CHROME_RESTART: NW.js|Whoa! NW.js has crashed. Relaunch now?|LEFT_TO_RIGHT
- CommonProgramFiles: C:\Program Files\Common Files
- CommonProgramFiles(x86): C:\Program Files (x86)\Common Files
- CommonProgramW6432: C:\Program Files\Common Files
- COMPUTERNAME: DESKTOP-1AQJ5O2
- ComSpec: C:\WINDOWS\system32\cmd.exe
- DriverData: C:\Windows\System32\Drivers\DriverData
- HOMEDRIVE: C:
- HOMEPATH: \Users\rishu
- LOCALAPPDATA: C:\Users\rishu\AppData\Local
- LOGONSERVER: \\DESKTOP-1AQJ5O2
- NUMBER_OF_PROCESSORS: 4
- OneDrive: C:\Users\rishu\OneDrive
- OneDriveConsumer: C:\Users\rishu\OneDrive
- OS: Windows_NT
- Path: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Users\rishu\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\rishu\AppData\Local\Programs\Python\Python39\;C:\Users\rishu\AppData\Local\Microsoft\WindowsApps;C:\Users\rishu\AppData\Local\Programs\Microsoft VS Code\bin;C:\src\flutter\bin;
- PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
- PGADMIN_INT_KEY: eed0d314-16dc-4a9c-a47e-52637ac085c9
- PGADMIN_INT_PORT: 5050
- PGADMIN_SERVER_MODE: OFF
- PROCESSOR_ARCHITECTURE: AMD64
- PROCESSOR_IDENTIFIER: Intel64 Family 6 Model 126 Stepping 5, GenuineIntel
- PROCESSOR_LEVEL: 6
- PROCESSOR_REVISION: 7e05
- ProgramData: C:\ProgramData
- ProgramFiles: C:\Program Files
- ProgramFiles(x86): C:\Program Files (x86)
- ProgramW6432: C:\Program Files
- PSModulePath: C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
- PUBLIC: C:\Users\Public
- SESSIONNAME: Console
- SystemDrive: C:
- SystemRoot: C:\WINDOWS
- TEMP: C:\Users\rishu\AppData\Local\Temp
- TMP: C:\Users\rishu\AppData\Local\Temp
- USERDOMAIN: DESKTOP-1AQJ5O2
- USERDOMAIN_ROAMINGPROFILE: DESKTOP-1AQJ5O2
- USERNAME: rishu
- USERPROFILE: C:\Users\rishu
- windir: C:\WINDOWS
--------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\rishu\Downloads\v5\python\lib\site-packages\sqlalchemy\engine\base.py", line 1276, in _execute_context
self.dialect.do_execute(
File "C:\Users\rishu\Downloads\v5\python\lib\site-packages\sqlalchemy\engine\default.py", line 608, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: duplicate column name: comment
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\rishu\Downloads\v5\web\pgAdmin4.py", line 98, in <module>
app = create_app()
File "C:\Users\rishu\Downloads\v5\web\pgadmin\__init__.py", line 365, in create_app
db_upgrade(app)
File "C:\Users\rishu\Downloads\v5\web\pgadmin\setup\db_upgrade.py", line 25, in db_upgrade
flask_migrate.upgrade(migration_folder)
File "C:\Users\rishu\Downloads\v5\python\lib\site-packages\flask_migrate\__init__.py", line 96, in wrapped
f(*args, **kwargs)
File "C:\Users\rishu\Downloads\v5\python\lib\site-packages\flask_migrate\__init__.py", line 271, in upgrade
command.upgrade(config, revision, sql=sql, tag=tag)
File "C:\Users\rishu\Downloads\v5\python\lib\site-packages\alembic\command.py", line 294, in upgrade
script.run_env()
File "C:\Users\rishu\Downloads\v5\python\lib\site-packages\alembic\script\base.py", line 490, in run_env
util.load_python_file(self.dir, "env.py")
File "C:\Users\rishu\Downloads\v5\python\lib\site-packages\alembic\util\pyfiles.py", line 97, in load_python_file
module = load_module_py(module_id, path)
File "C:\Users\rishu\Downloads\v5\python\lib\site-packages\alembic\util\compat.py", line 182, in load_module_py
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\rishu\Downloads\v5\web\pgadmin\setup\..\..\migrations\env.py", line 93, in <module>
run_migrations_online()
File "C:\Users\rishu\Downloads\v5\web\pgadmin\setup\..\..\migrations\env.py", line 86, in run_migrations_online
context.run_migrations()
File "<string>", line 8, in run_migrations
File "C:\Users\rishu\Downloads\v5\python\lib\site-packages\alembic\runtime\environment.py", line 813, in run_migrations
self.get_context().run_migrations(**kw)
File "C:\Users\rishu\Downloads\v5\python\lib\site-packages\alembic\runtime\migration.py", line 561, in run_migrations
step.migration_fn(**kw)
File "C:\Users\rishu\Downloads\v5\web\migrations\versions\09d53fca90c7_.py", line 40, in upgrade
db.engine.execute(
File "C:\Users\rishu\Downloads\v5\python\lib\site-packages\sqlalchemy\engine\base.py", line 2235, in execute
return connection.execute(statement, *multiparams, **params)
File "C:\Users\rishu\Downloads\v5\python\lib\site-packages\sqlalchemy\engine\base.py", line 1003, in execute
return self._execute_text(object_, multiparams, params)
File "C:\Users\rishu\Downloads\v5\python\lib\site-packages\sqlalchemy\engine\base.py", line 1172, in _execute_text
ret = self._execute_context(
File "C:\Users\rishu\Downloads\v5\python\lib\site-packages\sqlalchemy\engine\base.py", line 1316, in _execute_context
self._handle_dbapi_exception(
File "C:\Users\rishu\Downloads\v5\python\lib\site-packages\sqlalchemy\engine\base.py", line 1510, in _handle_dbapi_exception
util.raise_(
File "C:\Users\rishu\Downloads\v5\python\lib\site-packages\sqlalchemy\util\compat.py", line 182, in raise_
raise exception
File "C:\Users\rishu\Downloads\v5\python\lib\site-packages\sqlalchemy\engine\base.py", line 1276, in _execute_context
self.dialect.do_execute(
File "C:\Users\rishu\Downloads\v5\python\lib\site-packages\sqlalchemy\engine\default.py", line 608, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) duplicate column name: comment
[SQL: ALTER TABLE server ADD COLUMN comment TEXT(1024)]
(Background on this error at: http://sqlalche.me/e/13/e3q8)
I had checked this(http://sqlalche.me/e/13/e3q8) and tried reinstalling many times cant fix issues
Someone please help in this issues
My problem was fixed by deleting entire pgadmin folder here is path
"C:\Users\<USERNAME>\AppData\Roaming\pgadmin"