如何使用pgadmin4和apache解决内部服务器错误?

如何使用pgadmin4和apache解决内部服务器错误?,apache,pgadmin-4,Apache,Pgadmin 4,我已经安装了pdadmin,当我想运行它时,我已经安装了pdadmin 500内部服务器错误 apache中的日志给了我这个 AttributeError:“ReverseProxied”对象没有属性“app” 根据,您可以通过添加一行“self.app=app”来编辑/usr/share/pgadmin4/web/pgadmin4.py。这是我的区别: --- /usr/share/pgadmin4/web/pgAdmin4.py.20191205125322U.bak 2019-11

我已经安装了pdadmin,当我想运行它时,我已经安装了pdadmin

500内部服务器错误

apache中的日志给了我这个

AttributeError:“ReverseProxied”对象没有属性“app”

根据,您可以通过添加一行“self.app=app”来编辑/usr/share/pgadmin4/web/pgadmin4.py。这是我的区别:

--- /usr/share/pgadmin4/web/pgAdmin4.py.20191205125322U.bak 2019-11-12 18:55:01.000000000 +0100 +++ /usr/share/pgadmin4/web/pgAdmin4.py 2019-12-05 14:01:01.337805713 +0100 @@ -70,6 +70,7 @@ class ReverseProxied(object): def __init__(self, app): # https://werkzeug.palletsprojects.com/en/0.15.x/middleware/proxy_fix/#module-werkzeug.middleware.proxy_fix + self.app = app try: from werkzeug.middleware.proxy_fix import ProxyFix self.app = ProxyFix(app, ---/usr/share/pgadmin4/web/pgadmin4.py.20191205125322U.bak 2019-11-12 18:55:01.000000000+0100 +++/usr/share/pgadmin4/web/pgadmin4.py2019-12-0514:01:01.337805713+0100 @@ -70,6 +70,7 @@ 类反向模拟(对象): 定义初始化(自我,应用程序): # https://werkzeug.palletsprojects.com/en/0.15.x/middleware/proxy_fix/#module-werkzeug.middleware.proxy\u fix +self.app=app 尝试: 从werkzeug.middleware.proxy\u fix导入ProxyFix self.app=ProxyFix(app, 这是一个已知的bug,但正如您所看到的,它同时得到了修复:

frank@host ~/GIT/pgadmin4/web > git log c4facc04d3^..c4facc04d3 commit c4facc04d3b64f3902131737970727a4c8c4d2d0 Author: Aditya Toshniwal Date: Mon Dec 2 11:40:48 2019 +0530 Fix pgAdmin4 failed to start issue after upgrading to version 4.15. Fixes #4978 frank@host~/GIT/pgadmin4/web>GIT日志c4facc04d3^..c4facc04d3 提交c4facc04d3b64f3902131737970727a4c8c4d2d0 作者:Aditya Toshniwal 日期:2019年12月2日星期一11:40:48+0530 Fix pgAdmin4升级到4.15版后无法启动问题。Fix#4978 frank@host~/GIT/pgadmin4/web>GIT diff c4facc04d3^..c4facc04d3 差异——git a/docs/en_US/release_notes_4_16.rst b/docs/en_US/release_notes_4_16.rst 索引dc92d0c9c..74b4f7b9d 100644 ---a/docs/en_US/release_notes_4_16.rst +++b/docs/en_US/release_notes_4_16.rst @@-38,3+38,4@@Bug修复 |`Issue#4935`-修复可访问性问题。 |`Issue#4964`-修复未从表/列对话框中删除长度和精度的问题。 |`Issue#4965`-修复间隔数据类型未显示在表/列的属性对话框中的问题。 +|`Issue#4978`-修复pgAdmin4在升级到4.15版后无法启动Issue。 diff——git a/web/pgAdmin4.py b/web/pgAdmin4.py 索引845ca52aa..4668458f0 100644 ---a/web/pgAdmin4.py +++b/web/pgAdmin4.py @@-69,6+69,7@@如果不是os.path.isfile(config.SQLITE\u path): ########################################################################## 类反向模拟(对象): 定义初始化(自我,应用程序): +self.app=app # https://werkzeug.palletsprojects.com/en/0.15.x/middleware/proxy_fix/#module-werkzeug.middleware.proxy\u fix 尝试: 从werkzeug.middleware.proxy\u fix导入ProxyFix frank@host ~/GIT/pgadmin4/web > git diff c4facc04d3^..c4facc04d3 diff --git a/docs/en_US/release_notes_4_16.rst b/docs/en_US/release_notes_4_16.rst index dc92d0c9c..74b4f7b9d 100644 --- a/docs/en_US/release_notes_4_16.rst +++ b/docs/en_US/release_notes_4_16.rst @@ -38,3 +38,4 @@ Bug fixes | `Issue #4935 `_ - Fix accessibility issues. | `Issue #4964 `_ - Fix an issue where length and precision are not removed from table/column dialog. | `Issue #4965 `_ - Fix an issue where the Interval data type is not displayed in the properties dialog of table/column. +| `Issue #4978 `_ - Fix pgAdmin4 failed to start issue after upgrading to version 4.15. diff --git a/web/pgAdmin4.py b/web/pgAdmin4.py index 845ca52aa..4668458f0 100644 --- a/web/pgAdmin4.py +++ b/web/pgAdmin4.py @@ -69,6 +69,7 @@ if not os.path.isfile(config.SQLITE_PATH): ########################################################################## class ReverseProxied(object): def __init__(self, app): + self.app = app # https://werkzeug.palletsprojects.com/en/0.15.x/middleware/proxy_fix/#module-werkzeug.middleware.proxy_fix try: from werkzeug.middleware.proxy_fix import ProxyFix