ошибка python path при запуске pgadmin4

Для своего проекта скачал postgreSQL 14.11. Установил, создал супер юзера, создал базу данных, но при запуске pgadmin4 выходит ошибка:

The pgAdmin 4 server could not be contacted: pgAdmin Runtime Environment -------------------------------------------------------- Python Path: "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\python.exe" Runtime Config File: "C:\Users\Татьяна\AppData\Roaming\pgadmin\runtime_config.json" pgAdmin Config File: "C:\Program Files\PostgreSQL\14\pgAdmin 4\web\config.py" Webapp Path: "C:\Program Files\PostgreSQL\14\pgAdmin 4\web\pgAdmin4.py" pgAdmin Command: "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\python.exe -s C:\Program Files\PostgreSQL\14\pgAdmin 4\web\pgAdmin4.py" Environment:

  • ALLUSERSPROFILE: C:\ProgramData
  • APPDATA: C:\Users\Татьяна\AppData\Roaming
  • CHROME_CRASHPAD_PIPE_NAME: \.\pipe\crashpad_4724_MXBYYWBNDQTUACUB
  • CHROME_RESTART: NW.js|Произошел сбой NW.js. Перезапустить?|LEFT_TO_RIGHT
  • CommonProgramFiles: C:\Program Files\Common Files
  • CommonProgramFiles(x86): C:\Program Files (x86)\Common Files
  • CommonProgramW6432: C:\Program Files\Common Files
  • COMPUTERNAME: LAPTOP-0KI07I27
  • ComSpec: C:\WINDOWS\system32\cmd.exe
  • DriverData: C:\Windows\System32\Drivers\DriverData
  • FPS_BROWSER_APP_PROFILE_STRING: Internet Explorer
  • FPS_BROWSER_USER_PROFILE_STRING: Default
  • HOMEDRIVE: C:
  • HOMEPATH: \Users\Татьяна
  • LOCALAPPDATA: C:\Users\Татьяна\AppData\Local
  • LOGONSERVER: \LAPTOP-0KI07I27
  • NUMBER_OF_PROCESSORS: 2
  • OneDrive: C:\Users\Татьяна\OneDrive
  • OS: Windows_NT
  • Path: C:\Program Files\PostgreSQL\14\pgAdmin 4\runtime;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Git\cmd;C:\python\Scripts;C:\python;C:\Users\Татьяна\AppData\Local\Microsoft\WindowsApps;C:\Program Files\JetBrains\PyCharm Community Edition 2021.3.2\bin;C:\Users\Татьяна\AppData\Local\JetBrains\Toolbox\scripts;;C:\Program Files\JetBrains\PyCharm Community Edition 2023.2\bin;
  • PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
  • PGADMIN_INT_KEY: a9282a05-877c-448d-9510-82b19051e7a5
  • PGADMIN_INT_PORT: 53806
  • PGADMIN_SERVER_MODE: OFF
  • PROCESSOR_ARCHITECTURE: AMD64
  • PROCESSOR_IDENTIFIER: AMD64 Family 22 Model 48 Stepping 1, AuthenticAMD
  • PROCESSOR_LEVEL: 22
  • PROCESSOR_REVISION: 3001
  • 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
  • PyCharm Community Edition: C:\Program Files\JetBrains\PyCharm Community Edition 2023.2\bin;
  • SESSIONNAME: Console
  • SystemDrive: C:
  • SystemRoot: C:\WINDOWS
  • TEMP: C:\Users\8C74~1\AppData\Local\Temp
  • TMP: C:\Users\8C74~1\AppData\Local\Temp
  • USERDOMAIN: LAPTOP-0KI07I27
  • USERDOMAIN_ROAMINGPROFILE: LAPTOP-0KI07I27
  • USERNAME: Татьяна
  • USERPROFILE: C:\Users\Татьяна
  • VBOX_HWVIRTEX_IGNORE_SVM_IN_USE: 1
  • windir: C:\WINDOWS

Total spawn time to start the pgAdmin4 server: 0.101 Sec 2024-04-03 11:45:57,635: ERROR pgadmin: Database migration failed

2024-04-03 11:45:57,713: ERROR pgadmin: Traceback (most recent call last): File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1969, in _exec_single_context self.dialect.do_execute( File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\sqlalchemy\engine\default.py", line 922, in do_execute cursor.execute(statement, parameters) sqlite3.OperationalError: duplicate column name: connection_params

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Program Files\PostgreSQL\14\pgAdmin 4\web\pgadmin_init_.py", line 374, in upgrade_db db_upgrade(app) File "C:\Program Files\PostgreSQL\14\pgAdmin 4\web\pgadmin\setup\db_upgrade.py", line 22, in db_upgrade flask_migrate.upgrade(migration_folder) File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\flask_migrate_init_.py", line 111, in wrapped f(*args, **kwargs) File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\flask_migrate_init_.py", line 200, in upgrade command.upgrade(config, revision, sql=sql, tag=tag) File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\alembic\command.py", line 403, in upgrade script.run_env() File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\alembic\script\base.py", line 583, in run_env util.load_python_file(self.dir, "env.py") File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\alembic\util\pyfiles.py", line 95, in load_python_file module = load_module_py(module_id, path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\alembic\util\pyfiles.py", line 113, in load_module_py spec.loader.exec_module(module) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 940, in exec_module File "", line 241, in call_with_frames_removed File "C:\Program Files\PostgreSQL\14\pgAdmin 4\web\pgadmin\setup....\migrations\env.py", line 95, in run_migrations_online() File "C:\Program Files\PostgreSQL\14\pgAdmin 4\web\pgadmin\setup....\migrations\env.py", line 87, in run_migrations_online context.run_migrations() File "", line 8, in run_migrations File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\alembic\runtime\environment.py", line 948, in run_migrations self.get_context().run_migrations(**kw) File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\alembic\runtime\migration.py", line 627, in run_migrations step.migration_fn(**kw) File "C:\Program Files\PostgreSQL\14\pgAdmin 4\web\migrations\versions\f656e56dfdc8.py", line 111, in upgrade migrate_connection_params('server') File "C:\Program Files\PostgreSQL\14\pgAdmin 4\web\migrations\versions\f656e56dfdc8_.py", line 32, in migrate_connection_params op.add_column(table_name, File "", line 8, in add_column File "", line 3, in add_column File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\alembic\operations\ops.py", line 2142, in add_column return operations.invoke(op) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\alembic\operations\base.py", line 445, in invoke return fn(self, operation) ^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\alembic\operations\toimpl.py", line 171, in add_column operations.impl.add_column(table_name, column, schema=schema, **kw) File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\alembic\ddl\impl.py", line 334, in add_column self._exec(base.AddColumn(table_name, column, schema=schema)) File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\alembic\ddl\impl.py", line 207, in _exec return conn.execute(construct, multiparams) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1416, in execute return meth( ^^^^^ File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\sqlalchemy\sql\ddl.py", line 181, in _execute_on_connection return connection._execute_ddl( ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1528, in _execute_ddl ret = self._execute_context( ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1848, in _execute_context return self._exec_single_context( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1988, in _exec_single_context self._handle_dbapi_exception( File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\sqlalchemy\engine\base.py", line 2344, in _handle_dbapi_exception raise sqlalchemy_exception.with_traceback(exc_info[2]) from e File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1969, in _exec_single_context self.dialect.do_execute( File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\sqlalchemy\engine\default.py", line 922, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) duplicate column name: connection_params [SQL: ALTER TABLE server ADD COLUMN connection_params JSON] (Background on this error at: https://sqlalche.me/e/20/e3q8)

Traceback (most recent call last):

File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1969, in _exec_single_context

self.dialect.do_execute(   File "C:\Program Files\PostgreSQL\14\pgAdmin

4\python\Lib\site-packages\sqlalchemy\engine\default.py", line 922, in do_execute cursor.execute(statement, parameters)

sqlite3.OperationalError: duplicate column name: connection_params

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Program Files\PostgreSQL\14\pgAdmin 4\web\pgadmin_init_.py", line 374, in upgrade_db db_upgrade(app) File "C:\Program Files\PostgreSQL\14\pgAdmin 4\web\pgadmin\setup\db_upgrade.py", line 22, in db_upgrade

flask_migrate.upgrade(migration_folder)   File "C:\Program Files\PostgreSQL\14\pgAdmin

4\python\Lib\site-packages\flask_migrate_init_.py", line 111, in wrapped f(*args, **kwargs) File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\flask_migrate_init_.py", line 200, in upgrade command.upgrade(config, revision, sql=sql, tag=tag)

File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\alembic\command.py", line 403, in upgrade script.run_env() File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\alembic\script\base.py", line 583, in run_env

util.load_python_file(self.dir, "env.py")   File "C:\Program Files\PostgreSQL\14\pgAdmin

4\python\Lib\site-packages\alembic\util\pyfiles.py", line 95, in load_python_file module = load_module_py(module_id, path)

         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "C:\Program Files\PostgreSQL\14\pgAdmin

4\python\Lib\site-packages\alembic\util\pyfiles.py", line 113, in load_module_py spec.loader.exec_module(module) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "C:\Program Files\PostgreSQL\14\pgAdmin 4\web\pgadmin\setup....\migrations\env.py", line 95, in

run_migrations_online()   File "C:\Program Files\PostgreSQL\14\pgAdmin

4\web\pgadmin\setup....\migrations\env.py", line 87, in run_migrations_online context.run_migrations() File "", line 8, in run_migrations File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\alembic\runtime\environment.py", line 948, in run_migrations

self.get_context().run_migrations(**kw)   File "C:\Program Files\PostgreSQL\14\pgAdmin

4\python\Lib\site-packages\alembic\runtime\migration.py", line 627, in run_migrations

step.migration_fn(**kw)   File "C:\Program Files\PostgreSQL\14\pgAdmin

4\web\migrations\versions\f656e56dfdc8_.py", line 111, in upgrade migrate_connection_params('server') File "C:\Program Files\PostgreSQL\14\pgAdmin 4\web\migrations\versions\f656e56dfdc8_.py", line 32, in migrate_connection_params

op.add_column(table_name,   File "<string>", line 8, in add_column   File "<string>", line 3, in add_column   File "C:\Program

Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\alembic\operations\ops.py", line 2142, in add_column

return operations.invoke(op)
       ^^^^^^^^^^^^^^^^^^^^^   File "C:\Program Files\PostgreSQL\14\pgAdmin

4\python\Lib\site-packages\alembic\operations\base.py", line 445, in invoke return fn(self, operation) ^^^^^^^^^^^^^^^^^^^

File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\alembic\operations\toimpl.py", line 171, in add_column operations.impl.add_column(table_name, column, schema=schema, **kw) File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\alembic\ddl\impl.py", line 334, in add_column

self._exec(base.AddColumn(table_name, column, schema=schema))   File "C:\Program Files\PostgreSQL\14\pgAdmin

4\python\Lib\site-packages\alembic\ddl\impl.py", line 207, in _exec return conn.execute(construct, multiparams) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1416, in execute

return meth(

       ^^^^^   File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\sqlalchemy\sql\ddl.py", line 181, in

_execute_on_connection return connection._execute_ddl( ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1528, in _execute_ddl

ret = self._execute_context(
      ^^^^^^^^^^^^^^^^^^^^^^   File "C:\Program Files\PostgreSQL\14\pgAdmin

4\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1848, in _execute_context

return self._exec_single_context(

       ^^^^^^^^^^^^^^^^^^^^^^^^^^   File "C:\Program Files\PostgreSQL\14\pgAdmin

4\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1988, in _exec_single_context

self._handle_dbapi_exception(   File "C:\Program Files\PostgreSQL\14\pgAdmin

4\python\Lib\site-packages\sqlalchemy\engine\base.py", line 2344, in _handle_dbapi_exception

raise sqlalchemy_exception.with_traceback(exc_info[2]) from e

File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\sqlalchemy\engine\base.py", line 1969, in _exec_single_context

self.dialect.do_execute(

File "C:\Program Files\PostgreSQL\14\pgAdmin 4\python\Lib\site-packages\sqlalchemy\engine\default.py", line 922, in do_execute cursor.execute(statement, parameters)

sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) duplicate column name: connection_params [SQL: ALTER TABLE server ADD COLUMN connection_params JSON] (Background on this error at: https://sqlalche.me/e/20/e3q8)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Program Files\PostgreSQL\14\pgAdmin 4\web\pgAdmin4.py", line 104, in app = create_app() ^^^^^^^^^^^^ File "C:\Program Files\PostgreSQL\14\pgAdmin 4\web\pgadmin_init_.py", line 461, in create_app

run_migration_for_sqlite()   File "C:\Program Files\PostgreSQL\14\pgAdmin 4\web\pgadmin\__init__.py", line 420, in

run_migration_for_sqlite upgrade_db()

File "C:\Program Files\PostgreSQL\14\pgAdmin 4\web\pgadmin_init_.py", line 379, in upgrade_db

backup_db_file()   File "C:\Program Files\PostgreSQL\14\pgAdmin 4\web\pgadmin\__init__.py", line 356, in backup_db_file
os.rename(SQLITE_PATH, backup_file_name) PermissionError: [WinError 32] ������� �� ����� �������� ������ � �����, ��� ��� ����

���� ����� ������ ���������: 'C:\Users\�������\AppData\Roaming\pgadmin\pgadmin4.db' -> 'C:\Users\�������\AppData\Roaming\pgadmin\pgadmin4.db.20240403114557'


Ответы (0 шт):