Re: Database issues when adding GUI - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Database issues when adding GUI
Date
Msg-id 0ce89c8a-43fe-f0f5-afa7-c3587ffd332c@aklaver.com
Whole thread Raw
In response to Re: Database issues when adding GUI  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: Database issues when adding GUI  (Rich Shepard <rshepard@appl-ecosys.com>)
List 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.klaver@aklaver.com



pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Re: Database issues when adding GUI
Next
From: Rich Shepard
Date:
Subject: Re: Database issues when adding GUI