python - "An error occurred initiating application

对于在 Windows 7 上尝试启动 PgAdmin4 时收到的上述错误消息,我已经尝试了 Stackoverflow 上建议的所有可能的解决方案。

例如以管理员身份运行,将默认浏览器更改为 chrome/firefox/internet explorer,清除所有临时文件和转储文件,确保没有预装其他版本的 PgAdmin,系统环境变量中没有 PYTHONPATH 环境变量,在 services.msc 中重新启动 postgresql 服务等

我已经在不同的 PC 上成功安装了 PgAdmin 好几次,从未遇到过任何问题。 我也附加了 PgAdmin4 的转储

PgAdmin4 启动日志

2020-09-07 14:17:49: Checking for system tray...
2020-09-07 14:17:49: Starting pgAdmin4 server...
2020-09-07 14:17:49: Creating server object, port:49286, key:cb8137d0-2493-4750-9cfe-bb4222f103b9, 
logfile:E:/Users/RCCU/AppData/Local/pgadmin/pgadmin4/.pgAdmin4.2493675106.log
2020-09-07 14:17:49: Python Path: E:/Program Files/PostgreSQL/10/pgAdmin 4/venv/Lib/site- 
packages;E:/Program Files/PostgreSQL/10/pgAdmin 4/venv/DLLs;E:/Program Files/PostgreSQL/10/pgAdmin 4/venv/Lib
2020-09-07 14:17:49: Python Home: E:/Program Files/PostgreSQL/10/pgAdmin 4/venv
2020-09-07 14:17:49: Initializing Python...
2020-09-07 14:17:49: Python initialized.
2020-09-07 14:17:49: Adding new additional path elements
2020-09-07 14:17:49: Redirecting stderr...
2020-09-07 14:17:49: stderr redirected successfully.
2020-09-07 14:17:49: Initializing server...
2020-09-07 14:17:49: Webapp Path: E:/Program Files/PostgreSQL/10/pgAdmin 4/web/pgAdmin4.py
2020-09-07 14:17:49: Server initialized.
2020-09-07 14:17:49: Starting Server Thread...
2020-09-07 14:17:49: Open the application code and run it.
2020-09-07 14:17:49: Set the port number, key and force SERVER_MODE off
2020-09-07 14:17:49: PyRun_SimpleFile launching application server...
2020-09-07 14:17:49: Failed to launch the application server, server thread exiting.
2020-09-07 14:17:51: An error occurred initialising the application server:

Failed to launch the application server, server thread exiting.

**PgAdmin 4 Log**
Traceback (most recent call last):
File "E:/Program Files/PostgreSQL/10/pgAdmin 4/web/pgAdmin4.py", line 34, in <module>
import config
File "E:\Program Files\PostgreSQL\10\pgAdmin 4\web\config.py", line 25, in <module>
from pgadmin.utils import env, IS_WIN, fs_short_path
File "E:\Program Files\PostgreSQL\10\pgAdmin 4\web\pgadmin\__init__.py", line 19, in <module>
from flask import Flask, abort, request, current_app, session, url_for
File "E:/Program Files/PostgreSQL/10/pgAdmin 4/venv/Lib/site-packages\flask\__init__.py", line 17, in <module>
from werkzeug.exceptions import abort
File "E:/Program Files/PostgreSQL/10/pgAdmin 4/venv/Lib/site-packages\werkzeug\__init__.py", line 15, in <module>
from .serving import run_simple
File "E:/Program Files/PostgreSQL/10/pgAdmin 4/venv/Lib/site-packages\werkzeug\serving.py", line 41, in <module>
import socket
File "E:/Program Files/PostgreSQL/10/pgAdmin 4/venv/Lib\socket.py", line 49, in <module>
import _socket
ImportError: DLL load failed while importing _socket: The parameter is incorrect.

最佳答案

问题已经解决了。我安装了 Windows 10,一切都开始无缝运行。不过我不知道是什么导致了这个问题。

关于python - "An error occurred initiating application server. Failed to launch application server"适用于 Windows 7 上的 PgAdmin 4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63775587/

相关文章:

c# - 如何使 flutter 应用程序的 http 获取请求到本地主机?

python - Python 中 + (pos) 一元运算符的用途是什么?

python - 将多个 swagger 文档(来自不同的应用程序)合并到一个 swagger 仪表

html - 语法高亮器的可访问 HTML 结构

docker - 如何删除 docker 代理设置?

html - 根据自身内容调整banner高度

python - 是否有用于不同范数向量空间之间坐标转换的python算法?

python - 在条件下填充 df 的行

javascript - 指定列有更新时触发的 OnChange 触发器

python - 为什么我无法使用 "Send_file"从 Flask 发送图像以使用react