pgadmin4显示500(内部服务器错误)

时间:2019-04-10 04:50:09

标签: archlinux pgadmin-4

我从Arch Linux官方软件包存储库安装了pgadmin4(v4.4)软件包。它一直有效直到最新更新。现在,我无法添加新服务器。在浏览器中,我得到了错误:

http://127.0.0.1:36699/browser/server_group/children/1 500 (INTERNAL SERVER ERROR)

从服务器日志中,我得到了错误:

2019-04-09 21:41:49,900: ERROR  flask.app:  'psycopg2.extensions.Column' object has no attribute '_asdict'
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/lib/python3.7/site-packages/flask/views.py", line 88, in view
    return self.dispatch_request(*args, **kwargs)
  File "/usr/lib/pgadmin4/web/pgadmin/browser/utils.py", line 259, in dispatch_request
    return method(*args, **kwargs)
  File "/usr/lib/pgadmin4/web/pgadmin/browser/utils.py", line 309, in children
    children.extend(module.get_nodes(*args, **kwargs))
  File "/usr/lib/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py", line 127, in get_nodes
    in_recovery, wal_paused = recovery_state(conn, manager.version)
  File "/usr/lib/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py", line 52, in recovery_state
    status, result = connection.execute_dict(recovery_check_sql)
  File "/usr/lib/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 1202, in execute_dict
    desc.to_dict() for desc in cur.ordered_description()
  File "/usr/lib/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py", line 1202, in <listcomp>
    desc.to_dict() for desc in cur.ordered_description()
  File "/usr/lib/pgadmin4/web/pgadmin/utils/driver/psycopg2/cursor.py", line 94, in to_dict
    ores = OrderedDict(self.orig_col._asdict())
AttributeError: 'psycopg2.extensions.Column' object has no attribute '_asdict'

我想知道是否只有我一个人,因为我没有从Google搜索中得到任何东西。

3 个答案:

答案 0 :(得分:5)

我遇到相同的问题psycopg2 2.8.1。降级到2.7.7可以解决问题。

答案 1 :(得分:4)

pgAdmin4团队发布了新版本pgadmin4(v4.5),它将与最新版本的psycopg2一起使用,该版本为psycopg2 2.8.1

https://www.pgadmin.org/download/

错误:https://redmine.postgresql.org/issues/4143

答案 2 :(得分:0)

通过购买Navicat解决了这个问题。