With PyQgis 1.1.0 I want to connect to a PostGIS layer via Python plugin with
... uri = QgsDataSourceURI() uri.setConnection(self.DBHOST, self.DBPORT, self.DBNAME, self.DBUSER, self.DBPASSWD) ... Unfortunately QGIS throws the following Python error message: Error: uri.setConnection(self.DBHOST, self.DBPORT, self.DBNAME, self.DBUSER, self.DBPASSWD) TypeError: insufficient number of arguments to QgsDataSourceURI.setConnection() With respect to the class documentation setConnection() has exactly the number of arguments I use in my Python code. Furthermore the same code works fine with QGIS 1.0.0. I'm a little bit confused and I appreciate any hint. Regards Horst ------------------------------------------------ Dr. Horst Düster Stv. Amtschef / GIS-Koordinator Kanton Solothurn Bau- und Justizdepartement Amt für Geoinformation SO!GIS Koordination Rötistrasse 4 CH-4501 Solothurn Telefon ++41(0)32 627 25 32 Telefax ++41(0)32 627 22 14 mailto:horst.dues...@bd.so.ch http://www.agi.so.ch
_______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user