Re: Database issues when adding GUI

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Database issues when adding GUI
Date: 2021-06-07 17:33:03
Message-ID: 0ce89c8a-43fe-f0f5-afa7-c3587ffd332c@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 6/7/21 10:21 AM, Rich Shepard wrote:
> On Mon, 7 Jun 2021, Adrian Klaver wrote:
>
>> No this is because you did not use an actual connection string e.g:
>> psycopg2.connect("host=salmo user=rshepard dbname=bustrac")
>> Instead you used an undefined variable bustrac per the error message:
>> NameError: name 'bustrac' is not defined
>
> Adrian,
>
> First I'll upgrade 12.2 to 12.7, then I'll upgrade PyQt5.

The code snippet I showed is not tied to PyQt5, it is using psycopg2 and
was just a way of seeing if you could connect to the database via Python
and get results.

The issue seems to be with the QT driver for the Postgres. This is
supplied by QT itself:

https://doc.qt.io/qt-5/sql-driver.html
https://www.riverbankcomputing.com/static/Docs/PyQt5/api/qtsql/qsqldatabase.html

Not sure if a PyQt5 upgrade will by itself do an upgrade of the drivers.
That may require an update of QT5.

>
> Thanks,
>
> Rich
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2021-06-07 17:43:33 Re: Database issues when adding GUI
Previous Message Dean Gibson (DB Administrator) 2021-06-07 17:27:13 Re: AWS forcing PG upgrade from v9.6 a disaster