<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif;font-size:large"><font size="2">Rich,</font></div><div class="gmail_default" style="font-family:georgia,serif;font-size:large"><font size="2">I just tested Colin's database and both source files and it works on my machine (Linux Mint, Python 3.9.4)</font></div><div class="gmail_default" style="font-family:georgia,serif;font-size:large"><font size="2">Is your database available to have a look at it?</font></div><div class="gmail_default" style="font-family:georgia,serif;font-size:large"><font size="2">Tom</font><br></div></div><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif;font-size:large"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 5, 2021 at 6:34 PM Colin McPhail <<a href="mailto:colin.mcphail@mac.com" target="_blank">colin.mcphail@mac.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Rich,<br>
<br>
> On 5 Jun 2021, at 16:24, Rich Shepard <<a href="mailto:rshepard@appl-ecosys.com" target="_blank">rshepard@appl-ecosys.com</a>> wrote:<br>
> <br>
> Now: your food database displays the requested table in a QTableView. My<br>
> database does not display the activitytypes in a QTableView; only a blank<br>
> window. 'diff -y' shows no differences other than the names of the databases<br>
> and the tables.<br>
> <br>
> Attached is a ZIPped file with the two .py files and the two .log files. The<br>
> log file says it cannot find the table 'activitytypes' but it is in the<br>
> database:<br>
> bustrac=# \d<br>
> List of relations<br>
> Schema | Name | Type | Owner --------+---------------------------+----------+----------<br>
> public | activities | table | rshepard<br>
> public | activitytypes | table | rshepard<br>
> public | industrytypes | table | rshepard<br>
> public | locations | table | rshepard<br>
> public | organizations | table | rshepard<br>
> public | organizations_org_nbr_seq | sequence | rshepard<br>
> public | people | table | rshepard<br>
> public | people_person_nbr_seq | sequence | rshepard<br>
> public | projects | table | rshepard<br>
> public | statustypes | table | rshepard<br>
> <br>
> I am not seeing why that table is not seen.<br>
> <br>
Now that the Sqlite database table is getting displayed for you I fear I am at the end of my ability to help since I've never used anything other than Sqlite databases.<br>
<br>
However, I do notice that the list of tables in your database has a column called 'Owner.' Do you think that in datasource.py you should use the version of open() that takes a username and password? If that's not relevant you could maybe ask for ideas on StackOverflow if you haven't already.<br>
<br>
--<br>
Colin</blockquote></div></div>