Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Packaging PySide6 with Nuitka - qt.network.ssl issues
Forum Updated to NodeBB v4.3 + New Features

Packaging PySide6 with Nuitka - qt.network.ssl issues

Scheduled Pinned Locked Moved Unsolved Qt for Python
11 Posts 2 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    valvador92
    wrote on last edited by
    #1

    Hi!
    I am developing a software with a conda env and PySide6. When running on a terminal, everything works fine but after packaging with Nuitka I am getting errors.
    Here is my command:

    nuitka --standalone --plugin-enable=pyside6 --plugin-enable=numpy --plugin-enable=anti-bloat --output-dir Packaging_video_test video_test.py
    

    It creates the .exe. But when I want to launch the .exe, I get this error:

    qt.network.ssl: No functional TLS backend was found
    qt.network.ssl: No functional TLS backend was found
    qt.network.ssl: No functional TLS backend was found
    qt.network.ssl: No functional TLS backend was found
    qt.network.ssl: No TLS backend is available
    qt.network.ssl: No functional TLS backend was found
    qt.network.ssl: No functional TLS backend was found
    qt.network.ssl: No functional TLS backend was found
    qt.network.ssl: No functional TLS backend was found
    qt.network.ssl: No TLS backend is available
    qt.network.ssl: No functional TLS backend was found
    qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed
    

    After investigating a bit, it seems related to QtNetwork. If I don't import it, the packaging works fine. Unfortunately, I need it.
    Is this issue related to OpenSSL?

    I am a bit stuck.

    Thanks in advance for your help!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      From the looks of it, the OpenSSL librairies have not been deployed along the rest of your dependencies.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • V Offline
        V Offline
        valvador92
        wrote on last edited by
        #3

        @SGaist Thanks for your answer. What are actually those dlls/libraries?
        libcrypto-1_1-x64.dll and libssl-1_1-x64.dll are packaged in the dist folder. Are other DLLs/libraries needed?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Check with something like Dependency Walker to see if you have something missing for them.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          V 1 Reply Last reply
          0
          • SGaistS SGaist

            Check with something like Dependency Walker to see if you have something missing for them.

            V Offline
            V Offline
            valvador92
            wrote on last edited by
            #5

            @SGaist Thanks for the suggestion. I tried Dependency Walker, Dependencies and dumpbin.exe /dependents but it doesn't seem that anything is missing

            1 Reply Last reply
            0
            • V Offline
              V Offline
              valvador92
              wrote on last edited by
              #6

              @SGaist If you want to try on your side here is a minimal example:

              import sys
              from PySide6 import QtCore, QtNetwork, QtWidgets
              
              
              class CheckConnectivity(QtCore.QObject):
                  def __init__(self, *args, **kwargs):
                      QtCore.QObject.__init__(self, *args, **kwargs)
                      url = QtCore.QUrl("https://www.google.com/")
                      req = QtNetwork.QNetworkRequest(url)
                      self.net_manager = QtNetwork.QNetworkAccessManager()
                      self.res = self.net_manager.get(req)
                      self.res.finished.connect(self.processRes)
                      self.msg = QtWidgets.QMessageBox()
              
                  @QtCore.Slot()
                  def processRes(self):
                      if self.res.bytesAvailable():
                          self.msg.information(None, "Info", "You are connected to the Internet.")
                      self.res.deleteLater()
              
              
              if __name__ == "__main__":
                  app = QtWidgets.QApplication(sys.argv)
                  ic = CheckConnectivity()
                  sys.exit(app.exec())
              

              It runs fine from terminal but not after creating package with Nuitka:

              nuitka --standalone --plugin-enable=pyside6 --output-dir Packaging_check_connectivity check_connectivity.py
              
              
              qt.network.ssl: No functional TLS backend was found
              qt.network.ssl: No functional TLS backend was found
              qt.network.ssl: No functional TLS backend was found
              qt.network.ssl: No TLS backend is available
              qt.network.ssl: No functional TLS backend was found
              qt.network.ssl: No functional TLS backend was found
              qt.network.ssl: No functional TLS backend was found
              qt.network.ssl: No functional TLS backend was found
              qt.network.ssl: No TLS backend is available
              qt.network.ssl: No functional TLS backend was found
              qt.network.ssl: No functional TLS backend was found
              qt.network.ssl: No functional TLS backend was found
              qt.network.ssl: No functional TLS backend was found
              qt.network.ssl: No TLS backend is available
              qt.network.ssl: No functional TLS backend was found
              qt.network.ssl: No functional TLS backend was found
              qt.network.ssl: No functional TLS backend was found
              qt.network.ssl: No functional TLS backend was found
              qt.network.ssl: No TLS backend is available
              qt.network.ssl: No functional TLS backend was found
              qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed
              

              Here is my conda env:

              name: video_env
              channels:
                - anaconda
                - conda-forge
                - defaults
              dependencies:
                - ca-certificates=2020.10.14=0
                - jpeg=9b=vc14h4d7706e_1
                - libblas=3.9.0=5_hd5c7e75_netlib
                - libcblas=3.9.0=5_hd5c7e75_netlib
                - liblapack=3.9.0=5_hd5c7e75_netlib
                - libopencv=4.0.1=hbb9e17c_0
                - libpng=1.6.37=h2a8f88b_0
                - libsodium=1.0.18=h62dcd97_0
                - libtiff=4.1.0=h56a325e_1
                - lz4-c=1.9.2=hf4a77e7_3
                - m2w64-gcc-libgfortran=5.3.0=6
                - m2w64-gcc-libs=5.3.0=7
                - m2w64-gcc-libs-core=5.3.0=7
                - m2w64-gmp=6.1.0=2
                - m2w64-libwinpthread-git=5.0.0.4634.697f757=2
                - msys2-conda-epoch=20160418=1
                - ninja=1.10.2=h2d74725_1
                - nomkl=1.0=h5ca1d4c_0
                - numpy=1.21.4=py39h6635163_0
                - openssl=1.1.1l=h8ffe710_0
                - pip=21.3.1=pyhd8ed1ab_0
                - pybind11=2.9.0=py39h2e07f2f_0
                - pybind11-global=2.9.0=py39h2e07f2f_0
                - pyopengl=3.1.5=py_0
                - python=3.9.7=h6244533_1
                - python_abi=3.9=2_cp39
                - pywin32=303=py39hb82d6ee_0
                - setuptools=60.5.0=py39hcbf5309_0
                - sqlite=3.37.0=h8ffe710_0
                - tzdata=2020b=h7b6447c_0
                - vc=14.1=h0510ff6_4
                - vs2015_runtime=14.16.27012=hf0eaf9b_3
                - wheel=0.35.1=py_0
                - xz=5.2.5=h62dcd97_0
                - zlib=1.2.11=vc14h1cdd9ab_1
                - zstd=1.4.4=ha9fde0e_3
                - pip:
                  - nuitka==0.6.19.4
                  - pyside6==6.2.2.1
                  - shiboken6==6.2.2.1
              
              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Do you have the same issue if you build your environment only with pip ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                V 1 Reply Last reply
                0
                • SGaistS SGaist

                  Do you have the same issue if you build your environment only with pip ?

                  V Offline
                  V Offline
                  valvador92
                  wrote on last edited by
                  #8

                  @SGaist I haven't tested it. But for my app, Anaconda is needed. I can't change it unfortunately.

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    Related GitHub issue: https://github.com/Nuitka/Nuitka/issues/1390

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    V 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      Related GitHub issue: https://github.com/Nuitka/Nuitka/issues/1390

                      V Offline
                      V Offline
                      valvador92
                      wrote on last edited by
                      #10

                      @SGaist I posted the question their actually. This is my post.

                      1 Reply Last reply
                      1
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        I know, it was to keep the link with the thread as it looks like it's a Nuitka issue.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved