[PyQt] QtSql connection fail where psycopg2 success?

Panupat Chongstitwattana panupatc at gmail.com
Wed Jan 11 12:39:37 GMT 2012


No luck adding path. I tried add path directly to the dll and copy them
over to system32, didn't work.

This is strange. I'm at my office right now and 3 PC i'm testing this all
have the same problem. I remember the connection worked perfectly on my
home PC, will have to test that again tonight.

The QSqlDAtabase.drivers() only tells me it's a QStringList object. How do
I print out it's contents?

Thanks for your help Andreas :)

On Wed, Jan 11, 2012 at 7:24 PM, Andreas Pakulat <apaku at gmx.de> wrote:

> On 11.01.12 18:55:43, Panupat Chongstitwattana wrote:
> > Thanks Andreas.
> >
> > You're right I used windows binary installer. I don't seem to have the
> > postgresql.dll anywhere, nor can I find the Qt installation folder : /
>
> Sorry, should've mentioned that the filename was made up, no idea how
> its called on Windows. And as I said I also don't know the layout of the
> PyQt binary packages, so no idea what is to be considered the "Qt"
> directory or wether such a thing exists at all in the binary package.
>
> > Following your suggestion, lastError indead tells me drivers are not
> > loaded. But what makes me really confuse is that none of the drivers are
> > loading at all.
> >
> > QtSql.QSqlDatabase.isDriverAvailable('QPSQL')
> > QtSql.QSqlDatabase.isDriverAvailable('QMYSQL')
> > QtSql.QSqlDatabase.isDriverAvailable('QSQLITE')
> >
> > all returns False.
> >
> > I tried download and install the latest binary package but still same
> > problem.
>
> As even sqlite fails, that probably means the plugin is not found at
> all. Try adding C:\Python26\Lib\site-packages\PyQt4 to PATH.
>
> Also check what  QSqlDataBase.drivers() returns?
>
> Andreas
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20120111/d97ddc56/attachment.html>


More information about the PyQt mailing list