3
votes

I have a local postgresql 10 server (tested the same on 9.6, don't think it's related to the DB at all, only to pgAdmin4, as pgAdmin3 works just fine)

As in the screenshot, I am trying to connect to the localhost db with user postgres on a fresh installation, but I keep receiving this message:

readonly attribute

I searched everywhere for this error, but couldn't find any useful solutions or workaroundsenter image description here

4

4 Answers

1
votes

pg4Admin 4 now is working for me. I got an update of python-psycopg2 to 2.7.4-1.pgdg16.04+1 amd64 version on my KDE Neon, that solved, to me, the readonly attribute problem.

1
votes

This error is related to psycopg2. Please verify the version of psycopg2 installed on your system and update it to at least version 2.7.

At version 2.7 psycopg2 connection class the notices attribute is writable. On earlier versions it is a read only attribute.

If you comment the code in line 313 of /usr/share/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py you could check it out.

#pg_conn.notices = deque([], self.ASYNC_NOTICE_MAXLENGTH)

1
votes

You can try using pgAdmin4 wheel file, you will not face any such issues of an older version of packages from the native repo.

https://askubuntu.com/questions/831262/how-to-install-pgadmin-4-in-desktop-mode-on-ubuntu

1
votes

I am on Ubuntu 16.04, but using postgresql and pgAdmin from apt.postgresql.org. I struck this bug. But the new version of psycopg2 that came through with the latest apt update solved the problem for me.