Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lqGmJ-0003Y7-7x for pgsql-general@arkaria.postgresql.org; Mon, 07 Jun 2021 15:02:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lqGmI-0004iQ-7d for pgsql-general@arkaria.postgresql.org; Mon, 07 Jun 2021 15:02:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lqGmH-0004iH-Tb for pgsql-general@lists.postgresql.org; Mon, 07 Jun 2021 15:02:57 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lqGmA-000768-Mb for pgsql-general@lists.postgresql.org; Mon, 07 Jun 2021 15:02:56 +0000 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 9A3F32A0106 for ; Mon, 7 Jun 2021 08:02:48 -0700 (PDT) Date: Mon, 7 Jun 2021 08:02:48 -0700 (PDT) From: Rich Shepard Reply-To: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: Database issues when adding GUI Message-ID: User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is an unusual message and I hope someone(s) here can offer insights into the cause of the problem I've been wrestling with for the past couple of weeks. Context: For the past decade I've run my business tracking database from the psql shell (currently with postgresql-12.2) and decided it's time to add a frontend so it's a stand-alone desktop application. I'm learning to use PyQt5 as the widget set and application framework. The database contains three lookup tables: activitytypes, industrytypes, and statustypes, all have a single column and few rows. So I've started with these to get python3 and PyQt5-5.13.2 to run the SELECT query and display the results in a QTableView. The problem with all three is that my code produces an empty window and hangs. There's no python error displayed and the application reports finding the database but not the tables. For example, the activitytypes debugging log contains: INFO:root:found database DEBUG:root:Defining model/view DEBUG:root:model error: Unable to find table activitytypes DEBUG:root:about to execute select query DEBUG:root:End of Program I, and others on the python and pyqt mail lists and stackoverflow, can find nothing wrong with the python code. This suggests it's something with the database itself. But I have no idea where to look. The database structure is: bustrac=# \d List of relations Schema | Name | Type | Owner --------+---------------------------+----------+---------- public | activities | table | rshepard public | activitytypes | table | rshepard public | industrytypes | table | rshepard public | locations | table | rshepard public | organizations | table | rshepard public | organizations_org_nbr_seq | sequence | rshepard public | people | table | rshepard public | people_person_nbr_seq | sequence | rshepard public | projects | table | rshepard public | statustypes | table | rshepard (10 rows) What might stop a front-end application from finding a table that has been readily accessed from the psql shell? All suggestions and recommendations are needed. TIA, Rich