You are not logged in.

#1 2019-04-26 19:57:59

gkrukar
Member
Registered: 2018-05-11
Posts: 7

pgadmin4 - unable to connect to local postgresql database

Using current versions
postgresql 11.2-3
pgadmin4 4.4-1

1. Create -> Server
2. Set name, host, username, password
3. Unable to see created server connection

https://stackoverflow.com/questions/558 … onnections

pgadmin log

AttributeError: 'psycopg2.extensions.Column' object has no attribute '_asdict'
127.0.0.1 - - [26/Apr/2019 21:56:47] "GET /browser/server_group/children/1 HTTP/1.1" 500 -
2019-04-26 21:56:47,670: 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'
127.0.0.1 - - [26/Apr/2019 21:56:47] "GET /browser/server_group/children/1 HTTP/1.1" 500 -

Last edited by gkrukar (2019-04-26 20:06:31)

Offline

#2 2019-04-26 20:26:43

gkrukar
Member
Registered: 2018-05-11
Posts: 7

Re: pgadmin4 - unable to connect to local postgresql database

Works after downgrading python-psycopg2 to 2.7 via pip

Offline

#3 2019-04-26 23:14:29

loqs
Member
Registered: 2014-03-06
Posts: 17,377

Re: pgadmin4 - unable to connect to local postgresql database

You can downgrade packages using pacman which avoids the issues with untracked files from using pip to install modules system wide.

Offline

#4 2019-04-28 03:53:11

Flash6199
Member
Registered: 2019-04-28
Posts: 1

Re: pgadmin4 - unable to connect to local postgresql database

loqs wrote:

You can downgrade packages using pacman which avoids the issues with untracked files from using pip to install modules system wide.

I'm running into the exact same issue. I cant use the pacman cache since the earlier version was never installed.

Offline

#5 2019-04-28 04:12:51

loqs
Member
Registered: 2014-03-06
Posts: 17,377

Re: pgadmin4 - unable to connect to local postgresql database

Offline

#6 2019-04-29 22:26:28

elgs
Member
Registered: 2017-11-21
Posts: 3

Re: pgadmin4 - unable to connect to local postgresql database

Rather than downgrading the dependency, is there any chance to get the pgadmin4 updated? The 4.5 has been released in official website for a while. Thanks.

Offline

#7 2019-04-30 00:20:24

loqs
Member
Registered: 2014-03-06
Posts: 17,377

Re: pgadmin4 - unable to connect to local postgresql database

@elgs https://bbs.archlinux.org/viewtopic.php?id=130138 point 6.
Edit:
The bug is reported https://bugs.archlinux.org/task/62481
The package is flagged out of date.  You can locally build an updated version until the package is updated.

Last edited by loqs (2019-04-30 00:23:00)

Offline

Board footer

Powered by FluxBB