Windows 7上PgAdmin 4的“启动应用程序服务器时发生错误无法启动应用程序服务器”

问题描述

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

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

我已经在不同的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,一切开始无缝运行。我不知道是什么引起了问题。