I have a QGIS script that I am trying to load a vector layer that is stored in a Postgres database. When I print the layer\'s isValid() method I get False. Here is my code: