Re: pgAdmin4 (v 4.11) SELECT * returns 'table_oid'; now not enough values to unpack (expected 5, got 4)

From: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>
To: Tony Bazeley <tonyb(at)tonyb(dot)id(dot)au>
Cc: "pgadmin-support lists(dot)postgresql(dot)org" <pgadmin-support(at)lists(dot)postgresql(dot)org>
Subject: Re: pgAdmin4 (v 4.11) SELECT * returns 'table_oid'; now not enough values to unpack (expected 5, got 4)
Date: 2019-08-19 05:35:04
Message-ID: CAM9w-_n170fTDugUE68s_b1XWX_LS74S+FWNZx2hZv-L9oONBg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi Tony,

The official release of pgAdmin4 is 4.11. In 4.11-2, the dependency issue
(pysocpg2) on apt was fixed.
So don't worry, you're on the latest.

On Sun, Aug 18, 2019 at 7:27 AM Tony Bazeley <tonyb(at)tonyb(dot)id(dot)au> wrote:

> Thanks for the quick upgrade to fix this problem.
>
> I ran the upgrade to 4.11.2 through the package manager.
>
> But commands of the form select * from tablename now return: not enough
> values to unpack (expected 5, got 4)
>
> I noticed the the splash and about screens still referred to version 4.11
> so did a complete reinstall:
>
> sudo apt --purge remove pgadmin4
> sudo apt autoremove
> and sudo apt-get install pgadmin4
>
> and now have:
>
> sudo apt list --installed | grep pga
> pgadmin4-common/disco-pgdg,now 4.11-2.pgdg19.04+1 all [installed,automatic]
> pgadmin4-doc/disco-pgdg,now 4.11-2.pgdg19.04+1 all [installed,automatic]
> pgadmin4/disco-pgdg,now 4.11-2.pgdg19.04+1 amd64 [installed]
>
> However the problem still persists
>
> I notice stackoverflow has some recent advice on actions for the desktop
> version
> <https://stackoverflow.com/questions/57470715/pgadmin4-query-error-not-enough-values-to-unpack-expected-5-got-4/57482785#57482785>
> but I'm not sure how to proceed with the server version
>
>
> On 11/8/19 8:28 am, Tony Bazeley wrote:
>
> I'm no python programmer and have installed 4.11 under Kubuntu 19.04
>
> My python version is:
> ~$ python3 -V
> Python 3.7.3
> I installed psycopg2
> ~$ sudo pip3 install -U psycopg2
>
> And have a psycopg2 set of files in what seems to be an appropriate spot
>
> ~$ ls -l /usr/share/pgadmin4/web/pgadmin/utils/driver/psycopg2
> total 152
> -rw-r--r-- 1 root root 68788 Jul 23 14:45 connection.py
> -rw-r--r-- 1 root root 7750 Jul 23 14:45 cursor.py
> -rw-r--r-- 1 root root 3549 Jul 23 14:45 encoding.py
> -rw-r--r-- 1 root root 2259 Jul 23 14:45 generate_keywords.py
> -rw-r--r-- 1 root root 12706 Jul 23 14:45 __init__.py
> -rw-r--r-- 1 root root 9375 Jul 23 14:45 keywords.py
> drwxr-xr-x 2 root root 4096 Aug 11 00:02 __pycache__
> -rw-r--r-- 1 root root 20569 Jul 23 14:45 server_manager.py
> -rw-r--r-- 1 root root 8416 Jul 23 14:45 typecast.py
>
> But the problem persists
> Using the tablename>view/edit/data facility works, but using the same sql
> in the Query Tool returns 'table_oid'
>
> Any thoughts on what to do next would be greatly appreciated
>
> Tony
>
>
> On 28/7/19 6:27 pm, Dave Page wrote:
>
>
>
> On 27 Jul 2019, at 21:14, richard coleman <rcoleman(dot)ascentgl(at)gmail(dot)com>
> wrote:
>
> 'ello all,
>
> When running the following query:
>
> SELECT * FROM live.tbl_documents limit 10000;
>
> in pgAdmin4 it returns *no* output and switches to the Messages tab with
> the following message:
>
> 'table_oid'
>
>
> Upgrade psycopg2 to 2.8.3. pgAdmin has required 2.8.x for some time.
>
>
> The same query against the same table in the same database run at the psql
> prompt returns the records as expected.
>
> postgreSQL 10.3
>
> using pgAdmin4
> Version
> 4.11
> Copyright
> Copyright (C) 2013 - 2019, The pgAdmin Development Team
> Python Version
> 3.6.8 (default, Jan 14 2019, 11:02:34) [GCC 8.0.1 20180414 (experimental)
> [trunk revision 259383]]
> Flask Version
> 0.12.2
> Application Mode
> Desktop
> Current User
> pgadmin4(at)pgadmin(dot)org
>
> Running on Chromium
> Version 75.0.3770.90 (Official Build) Built on Ubuntu , running on Ubuntu
> 18.04 (64-bit)
>
> Kubuntu 18.04.
>
> Table:
> CREATE TABLE live.tbl_documents
> (
> id character varying(50) COLLATE pg_catalog."default" NOT NULL,
> company_no character varying(32) COLLATE pg_catalog."default",
> tariff_id integer,
> scac character(4) COLLATE pg_catalog."default",
> type character varying(50) COLLATE pg_catalog."default" NOT NULL,
> name character varying(200) COLLATE pg_catalog."default" NOT NULL,
> filelocation character varying(200) COLLATE pg_catalog."default" NOT
> NULL,
> description character varying(200) COLLATE pg_catalog."default" NOT
> NULL,
> archive boolean NOT NULL DEFAULT false,
> par_id character varying(50) COLLATE pg_catalog."default",
> category character varying(250) COLLATE pg_catalog."default",
> visible_in_vision boolean NOT NULL DEFAULT false,
> tariffrequest_id character varying(50) COLLATE pg_catalog."default",
> entered_on timestamp without time zone NOT NULL DEFAULT now(),
> invoice_id character varying(40) COLLATE pg_catalog."default",
> lastwritetime timestamp without time zone,
> shipment_id character varying(40) COLLATE pg_catalog."default",
> CONSTRAINT tbl_documents_pkey PRIMARY KEY (id),
> CONSTRAINT tbl_documents_par_id_fkey FOREIGN KEY (par_id)
> REFERENCES live.tbl_pars (par_id) MATCH SIMPLE
> ON UPDATE NO ACTION
> ON DELETE NO ACTION
> )
> WITH (
> OIDS = FALSE
> )
> TABLESPACE pg_default;
>
>
>
>

--
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Aditya Toshniwal 2019-08-19 05:42:47 Re: pgAdmin4 (v 4.11) SELECT * returns 'table_oid'; now not enough values to unpack (expected 5, got 4)
Previous Message Tony Bazeley 2019-08-18 01:57:06 Re: pgAdmin4 (v 4.11) SELECT * returns 'table_oid'; now not enough values to unpack (expected 5, got 4)