Search code examples
pgadminpgadmin-4

pgAdmin4.4 not listing connections


I'm using pgAdmin4 on Linux, but for some reason I'm not able to list my stored connections anymore. It worked on a fresh install for a few days and then suddenly stopped working after a reboot (no installations/updates done beforehand). I experienced this on multiple machines with similar setups.

System info:

  • Kernel: 4.19.34-1-MANJARO
  • Distribution: Manjaro
  • Python 3.7.3

When I try to list my stored connections, the following appears in ~/.pgadmin/pgadmin4.log:

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'

Any ideas what could be wrong here?


Solution

  • This was a bug due to new release of psycopg2 module, It has been fixed with latest release of pgAdmin4 v4.5, Please upgrade it to latest version.

    https://www.pgadmin.org/download/pgadmin-4-python-wheel/

    Ref: https://redmine.postgresql.org/issues/4143