Packaging PySide6 with Nuitka - qt.network.ssl issues
-
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!
-
Hi,
From the looks of it, the OpenSSL librairies have not been deployed along the rest of your dependencies.
-
@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? -
Check with something like Dependency Walker to see if you have something missing for them.
-
@SGaist Thanks for the suggestion. I tried Dependency Walker, Dependencies and dumpbin.exe /dependents but it doesn't seem that anything is missing
-
@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
-
Do you have the same issue if you build your environment only with pip ?
-
@SGaist I haven't tested it. But for my app, Anaconda is needed. I can't change it unfortunately.
-
Related GitHub issue: https://github.com/Nuitka/Nuitka/issues/1390
-
Related GitHub issue: https://github.com/Nuitka/Nuitka/issues/1390
@SGaist I posted the question their actually. This is my post.
-
I know, it was to keep the link with the thread as it looks like it's a Nuitka issue.