Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1399

QPSQL - Driver not loaded

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.15.1
    • PySide
    • None
    • Windows

    Description

      When I try to open a db withthe QPSQL-Driver it fails with the error message: QSqlDatabase: QPSQL driver not loaded

       

      When I put the contents of the the postgreSQL ODBC driver (https://www.postgresql.org/ftp/odbc/versions/msi/) to the project folder, the code works well.

       

      from PySide2.QtCore import QCoreApplication
      from PySide2.QtSql import QSqlDatabase
      
      QCoreApplication()
      db = QSqlDatabase("QPSQL")
      # db-server, db and auth-data are not needed to show
      db.open()
      

       Error:

       

      python PgSqlTest.py
      QSqlDatabase: QPSQL driver not loaded
      QSqlDatabase: available drivers: QSQLITE QODBC QODBC3
      

      And with the files of the ODBC-Driver:

      False could not connect to server: Connection refused (0x0000274D/10061)
       Is the server running on host "localhost" (::1) and accepting
       TCP/IP connections on port 5432?
      could not connect to server: Connection refused (0x0000274D/10061)
       Is the server running on host "localhost" (127.0.0.1) and accepting
       TCP/IP connections on port 5432?
      QPSQL: Unable to connect

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            doev do ev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes