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

Pyside2 app hangs in QSqlQueryModel.setQuery() connecting to database over paramiko/sshtunnel (PostGres)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.5.4, 6.6.2, 6.7.0, 6.2.11
    • 6.4.3
    • PySide
    • None
    • Linux/X11, Windows
    • 3bc23d377 (dev), a4502efe0 (tqtc/lts-5.15), 4377347e4 (6.4), ce509b2d5 (tqtc/lts-6.2), 3ad6f139d (dev), b626f36d7 (6.6), ddf21b778 (tqtc/lts-6.5), 98b8acf32 (tqtc/lts-6.2)

    Description

      I wrote a python3/pyside accounting app that works connecting to a remote postgres database over a paramiko tunnel with QPSQL connector. This app is working since 2015 and was ported from pyside to pyside2 till 5.14.1 version with no problems.

      Starting from pyside2 5.14.2 version, the database connection doesn't work anymore: when I launch the connection, paramiko starts, tunnel starts, the database connects for a first handshake, then the app hangs indefinitely with no error message.

      All versions i tried >=5.14.1 (and 6.x also) have this behaviour, so  I cannot upgrade the libraries anymore.

      In order to provide you a minimal example, I changed the ssh connector paramiko with sshtunnel package: the situation is the same, but the example is really shorter and simpler.

      The test environment requires python3, pyside2, sshtunnel. I use the miniconda environment where packages are installed with standard pip.

      I enclose a three files app: open the conn.py file and look at the README instructions.

      Tank you in advance for the help.

       

      +++++ 04/03/2023 Re-opening +++++

      After the fix with the 6.4.3 version, I verified that the QSqlQuery() and QSqlQueryModel() components are running, but the QSqlTableModel() and the QSqlRelationalTableModel() are not.

      Please, let me know if it does exist something I can do, a patch or something else to make my app running as it was before.

      Thanks in advance.

       

      Attachments

        1. conn.py
          5 kB
        2. pyside1931_6.zip
          5 kB
        3. pyside1931_stack.txt
          2 kB
        4. pyside1931.zip
          5 kB
        5. tunnel3.py
          2 kB
        6. Ui_conn.py
          9 kB

        Issue Links

          For Gerrit Dashboard: PYSIDE-1931
          # Subject Branch Project Status CR V

          Activity

            People

              kleint Friedemann Kleint
              fabio.moreale fabio moreale
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: