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 1lqHfn-0006Cu-Tj for pgsql-general@arkaria.postgresql.org; Mon, 07 Jun 2021 16:00:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lqHfm-0001sy-TY for pgsql-general@arkaria.postgresql.org; Mon, 07 Jun 2021 16:00:18 +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 1lqHfm-0001sd-K5 for pgsql-general@lists.postgresql.org; Mon, 07 Jun 2021 16:00:18 +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 1lqHfg-0007fQ-M1 for pgsql-general@lists.postgresql.org; Mon, 07 Jun 2021 16:00:17 +0000 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id E360A2A0106 for ; Mon, 7 Jun 2021 09:00:11 -0700 (PDT) Date: Mon, 7 Jun 2021 09:00:11 -0700 (PDT) From: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: Re: Database issues when adding GUI In-Reply-To: Message-ID: References: <48392c33-d63e-15be-e7de-d7a7c0c2fd80@gmail.com> <34B90F57-654D-4170-A7E9-613EB40A952C@americanefficient.com> 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 On Mon, 7 Jun 2021, Adrian Klaver wrote: > What Philip is suggesting is to use Python only simple script to connect to > database and retrieve from table. Something like: > > import psycopg2 > > con = psycopg2.connect() > cur = con.cursor() > cur.execute('select * from activitytypes') > rs = cur.fetchall() > print(rs) Adrian, >>> con = psycopg2.connect(bustrac) Traceback (most recent call last): File "", line 1, in NameError: name 'bustrac' is not defined That's because there's a problem with connecting to the database. See my reply to Rob's message. Thanks, Rich