Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. PyQt5 and tensorflowlite causes crashes?

PyQt5 and tensorflowlite causes crashes?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
7 Posts 3 Posters 1.1k Views
  • 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.
  • H Offline
    H Offline
    Herald_Poro
    wrote on last edited by
    #1

    Hi, I'm running on Linux based system on Python 3.6 since tensorflow only works on 3.6 on my system and I was trying to make inferences on a tensorflow lite model with Qt acting as the GUI.

    However, by just even importing the tensorflow library, the whole program crashes with

    2021-06-22 21:37:11.656636: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcudart.so.11.0
    QObject::moveToThread: Current thread (0x3aa3de0) is not the object's thread (0x5959930).
    Cannot move to target thread (0x3aa3de0)
    
    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "~/.local/lib/python3.6/site-packages/cv2/qt/plugins" even though it was found.
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
    
    Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.
    

    What should I do to overcome this problem?
    Thanks.

    JonBJ 1 Reply Last reply
    1
    • H Herald_Poro

      Hi, I'm running on Linux based system on Python 3.6 since tensorflow only works on 3.6 on my system and I was trying to make inferences on a tensorflow lite model with Qt acting as the GUI.

      However, by just even importing the tensorflow library, the whole program crashes with

      2021-06-22 21:37:11.656636: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcudart.so.11.0
      QObject::moveToThread: Current thread (0x3aa3de0) is not the object's thread (0x5959930).
      Cannot move to target thread (0x3aa3de0)
      
      qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "~/.local/lib/python3.6/site-packages/cv2/qt/plugins" even though it was found.
      This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
      
      Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.
      

      What should I do to overcome this problem?
      Thanks.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Herald_Poro
      Strangely, you seem to have exactly the same issue as https://forum.qt.io/topic/127824/qt-qpa-plugin-could-not-load-the-qt-platform-plugin-xcb which is currently on-going. Unless you are that user too! Start by reading through that, and do the QT_DEBUG_PLUGINS=1 environment variable to see where you get.

      1 Reply Last reply
      2
      • H Offline
        H Offline
        Herald_Poro
        wrote on last edited by Herald_Poro
        #3

        @JonB
        We're different people I'm afriad.
        I've done the QT_DEBUG_PLUGINS=1 and the whole results are in the Google Drive link. (shorturl.at/kBGIJ)
        However, this is the ending of the results which may be of use?

        QFactoryLoader::QFactoryLoader() checking directory path "/home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms" ...
        QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/libqxcb.so"
        Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/libqxcb.so, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "xcb"
                ]
            },
            "archreq": 0,
            "className": "QXcbIntegrationPlugin",
            "debug": false,
            "version": 331520
        }
        
        
        Got keys from plugin meta data ("xcb")
        QFactoryLoader::QFactoryLoader() checking directory path "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms" ...
        QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqeglfs.so"
        Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqeglfs.so, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "eglfs"
                ]
            },
            "archreq": 0,
            "className": "QEglFSIntegrationPlugin",
            "debug": false,
            "version": 331520
        }
        
        
        Got keys from plugin meta data ("eglfs")
        QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqlinuxfb.so"
        Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqlinuxfb.so, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "linuxfb"
                ]
            },
            "archreq": 0,
            "className": "QLinuxFbIntegrationPlugin",
            "debug": false,
            "version": 331520
        }
        
        
        Got keys from plugin meta data ("linuxfb")
        QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqminimal.so"
        Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqminimal.so, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "minimal"
                ]
            },
            "archreq": 0,
            "className": "QMinimalIntegrationPlugin",
            "debug": false,
            "version": 331520
        }
        
        
        Got keys from plugin meta data ("minimal")
        QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqminimalegl.so"
        Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqminimalegl.so, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "minimalegl"
                ]
            },
            "archreq": 0,
            "className": "QMinimalEglIntegrationPlugin",
            "debug": false,
            "version": 331520
        }
        
        
        Got keys from plugin meta data ("minimalegl")
        QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqoffscreen.so"
        Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqoffscreen.so, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "offscreen"
                ]
            },
            "archreq": 0,
            "className": "QOffscreenIntegrationPlugin",
            "debug": false,
            "version": 331520
        }
        
        
        Got keys from plugin meta data ("offscreen")
        QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqvnc.so"
        Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqvnc.so, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "vnc"
                ]
            },
            "archreq": 0,
            "className": "QVncIntegrationPlugin",
            "debug": false,
            "version": 331520
        }
        
        
        Got keys from plugin meta data ("vnc")
        QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-egl.so"
        Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-egl.so, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "wayland-egl"
                ]
            },
            "archreq": 0,
            "className": "QWaylandEglPlatformIntegrationPlugin",
            "debug": false,
            "version": 331520
        }
        
        
        Got keys from plugin meta data ("wayland-egl")
        QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-generic.so"
        Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-generic.so, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "wayland"
                ]
            },
            "archreq": 0,
            "className": "QWaylandIntegrationPlugin",
            "debug": false,
            "version": 331520
        }
        
        
        Got keys from plugin meta data ("wayland")
        QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-egl.so"
        Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-egl.so, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "wayland-xcomposite-egl"
                ]
            },
            "archreq": 0,
            "className": "QWaylandXCompositeEglPlatformIntegrationPlugin",
            "debug": false,
            "version": 331520
        }
        
        
        Got keys from plugin meta data ("wayland-xcomposite-egl")
        QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-glx.so"
        Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-glx.so, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "wayland-xcomposite-glx"
                ]
            },
            "archreq": 0,
            "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin",
            "debug": false,
            "version": 331520
        }
        
        
        Got keys from plugin meta data ("wayland-xcomposite-glx")
        QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwebgl.so"
        Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwebgl.so, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "webgl"
                ]
            },
            "archreq": 0,
            "className": "QWebGLIntegrationPlugin",
            "debug": false,
            "version": 331520
        }
        
        
        Got keys from plugin meta data ("webgl")
        QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so"
        Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so, metadata=
        {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
                "Keys": [
                    "xcb"
                ]
            },
            "archreq": 0,
            "className": "QXcbIntegrationPlugin",
            "debug": false,
            "version": 331520
        }
        
        
        Got keys from plugin meta data ("xcb")
        QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
        loaded library "/home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/libqxcb.so"
        QObject::moveToThread: Current thread (0x34c51b0) is not the object's thread (0x5512280).
        Cannot move to target thread (0x34c51b0)
        
        qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins" even though it was found.
        This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
        
        Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.
        
        Aborted (core dumped)
        

        While, running ldd /home/<username>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/libqxcb.so gave me:

        	linux-vdso.so.1 (0x00007ffda3782000)
        	libQt5XcbQpa-70670cdb.so.5.15.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libQt5XcbQpa-70670cdb.so.5.15.0 (0x00007f7fa85ca000)
        	libfreetype-8d3bcff4.so.6.14.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libfreetype-8d3bcff4.so.6.14.0 (0x00007f7fa82fa000)
        	libz-d8a329de.so.1.2.7 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libz-d8a329de.so.1.2.7 (0x00007f7fa80e3000)
        	libQt5Gui-ca084835.so.5.15.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libQt5Gui-ca084835.so.5.15.0 (0x00007f7fa774c000)
        	libQt5Core-d92f2856.so.5.15.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libQt5Core-d92f2856.so.5.15.0 (0x00007f7fa6ff4000)
        	libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f7fa6f51000)
        	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7fa6f2e000)
        	libX11-xcb-1ae4fd0e.so.1.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libX11-xcb-1ae4fd0e.so.1.0.0 (0x00007f7fa6d2b000)
        	libxcb-icccm-413c9f41.so.4.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-icccm-413c9f41.so.4.0.0 (0x00007f7fa6b25000)
        	libxcb-image-e82a276d.so.0.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-image-e82a276d.so.0.0.0 (0x00007f7fa691d000)
        	libxcb-shm-7a199f70.so.0.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-shm-7a199f70.so.0.0.0 (0x00007f7fa6715000)
        	libxcb-keysyms-21015570.so.1.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-keysyms-21015570.so.1.0.0 (0x00007f7fa6511000)
        	libxcb-randr-a96a5a87.so.0.1.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-randr-a96a5a87.so.0.1.0 (0x00007f7fa62fa000)
        	libxcb-render-util-43ce00f5.so.0.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-render-util-43ce00f5.so.0.0.0 (0x00007f7fa60f4000)
        	libxcb-render-637b984a.so.0.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-render-637b984a.so.0.0.0 (0x00007f7fa5ee0000)
        	libxcb-shape-25c2b258.so.0.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-shape-25c2b258.so.0.0.0 (0x00007f7fa5cd8000)
        	libxcb-sync-89374f40.so.1.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-sync-89374f40.so.1.0.0 (0x00007f7fa5acf000)
        	libxcb-xfixes-9be3ba6f.so.0.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-xfixes-9be3ba6f.so.0.0.0 (0x00007f7fa58c3000)
        	libxcb-xinerama-ae147f87.so.0.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-xinerama-ae147f87.so.0.0.0 (0x00007f7fa56be000)
        	libxcb-xkb-9ba31ab3.so.1.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-xkb-9ba31ab3.so.1.0.0 (0x00007f7fa5497000)
        	libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f7fa546b000)
        	libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f7fa5456000)
        	libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f7fa5319000)
        	libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007f7fa530e000)
        	libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007f7fa52f0000)
        	libxkbcommon-x11-c65ed502.so.0.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxkbcommon-x11-c65ed502.so.0.0.0 (0x00007f7fa50e3000)
        	libxkbcommon-71ae2972.so.0.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxkbcommon-71ae2972.so.0.0.0 (0x00007f7fa4ea0000)
        	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7fa4e9a000)
        	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7fa4cb9000)
        	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7fa4b6a000)
        	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7fa4b4f000)
        	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7fa495d000)
        	libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f7fa4956000)
        	libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f7fa482d000)
        	libbz2-a273e504.so.1.0.6 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libbz2-a273e504.so.1.0.6 (0x00007f7fa461c000)
        	libpng15-c2ffaf3d.so.15.13.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libpng15-c2ffaf3d.so.15.13.0 (0x00007f7fa43ed000)
        	/lib64/ld-linux-x86-64.so.2 (0x00007f7fa887d000)
        	libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f7fa4335000)
        	libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f7fa42ff000)
        	libxcb-util-4d666913.so.1.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-util-4d666913.so.1.0.0 (0x00007f7fa40f8000)
        	libXau-00ec42fe.so.6.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libXau-00ec42fe.so.6.0.0 (0x00007f7fa3ef3000)
        	libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f7fa3eed000)
        	libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f7fa3ee5000)
        	libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f7fa3eda000)
        	libbsd.so.0 => /usr/lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f7fa3ec0000)
        	libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f7fa3e4d000)
        
        JonBJ 1 Reply Last reply
        0
        • H Herald_Poro

          @JonB
          We're different people I'm afriad.
          I've done the QT_DEBUG_PLUGINS=1 and the whole results are in the Google Drive link. (shorturl.at/kBGIJ)
          However, this is the ending of the results which may be of use?

          QFactoryLoader::QFactoryLoader() checking directory path "/home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms" ...
          QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/libqxcb.so"
          Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/libqxcb.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "xcb"
                  ]
              },
              "archreq": 0,
              "className": "QXcbIntegrationPlugin",
              "debug": false,
              "version": 331520
          }
          
          
          Got keys from plugin meta data ("xcb")
          QFactoryLoader::QFactoryLoader() checking directory path "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms" ...
          QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqeglfs.so"
          Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqeglfs.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "eglfs"
                  ]
              },
              "archreq": 0,
              "className": "QEglFSIntegrationPlugin",
              "debug": false,
              "version": 331520
          }
          
          
          Got keys from plugin meta data ("eglfs")
          QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqlinuxfb.so"
          Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqlinuxfb.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "linuxfb"
                  ]
              },
              "archreq": 0,
              "className": "QLinuxFbIntegrationPlugin",
              "debug": false,
              "version": 331520
          }
          
          
          Got keys from plugin meta data ("linuxfb")
          QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqminimal.so"
          Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqminimal.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "minimal"
                  ]
              },
              "archreq": 0,
              "className": "QMinimalIntegrationPlugin",
              "debug": false,
              "version": 331520
          }
          
          
          Got keys from plugin meta data ("minimal")
          QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqminimalegl.so"
          Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqminimalegl.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "minimalegl"
                  ]
              },
              "archreq": 0,
              "className": "QMinimalEglIntegrationPlugin",
              "debug": false,
              "version": 331520
          }
          
          
          Got keys from plugin meta data ("minimalegl")
          QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqoffscreen.so"
          Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqoffscreen.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "offscreen"
                  ]
              },
              "archreq": 0,
              "className": "QOffscreenIntegrationPlugin",
              "debug": false,
              "version": 331520
          }
          
          
          Got keys from plugin meta data ("offscreen")
          QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqvnc.so"
          Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqvnc.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "vnc"
                  ]
              },
              "archreq": 0,
              "className": "QVncIntegrationPlugin",
              "debug": false,
              "version": 331520
          }
          
          
          Got keys from plugin meta data ("vnc")
          QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-egl.so"
          Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-egl.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "wayland-egl"
                  ]
              },
              "archreq": 0,
              "className": "QWaylandEglPlatformIntegrationPlugin",
              "debug": false,
              "version": 331520
          }
          
          
          Got keys from plugin meta data ("wayland-egl")
          QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-generic.so"
          Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-generic.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "wayland"
                  ]
              },
              "archreq": 0,
              "className": "QWaylandIntegrationPlugin",
              "debug": false,
              "version": 331520
          }
          
          
          Got keys from plugin meta data ("wayland")
          QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-egl.so"
          Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-egl.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "wayland-xcomposite-egl"
                  ]
              },
              "archreq": 0,
              "className": "QWaylandXCompositeEglPlatformIntegrationPlugin",
              "debug": false,
              "version": 331520
          }
          
          
          Got keys from plugin meta data ("wayland-xcomposite-egl")
          QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-glx.so"
          Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-glx.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "wayland-xcomposite-glx"
                  ]
              },
              "archreq": 0,
              "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin",
              "debug": false,
              "version": 331520
          }
          
          
          Got keys from plugin meta data ("wayland-xcomposite-glx")
          QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwebgl.so"
          Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqwebgl.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "webgl"
                  ]
              },
              "archreq": 0,
              "className": "QWebGLIntegrationPlugin",
              "debug": false,
              "version": 331520
          }
          
          
          Got keys from plugin meta data ("webgl")
          QFactoryLoader::QFactoryLoader() looking at "/home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so"
          Found metadata in lib /home/<user>/.local/lib/python3.6/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "xcb"
                  ]
              },
              "archreq": 0,
              "className": "QXcbIntegrationPlugin",
              "debug": false,
              "version": 331520
          }
          
          
          Got keys from plugin meta data ("xcb")
          QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
          loaded library "/home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/libqxcb.so"
          QObject::moveToThread: Current thread (0x34c51b0) is not the object's thread (0x5512280).
          Cannot move to target thread (0x34c51b0)
          
          qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins" even though it was found.
          This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
          
          Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.
          
          Aborted (core dumped)
          

          While, running ldd /home/<username>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/libqxcb.so gave me:

          	linux-vdso.so.1 (0x00007ffda3782000)
          	libQt5XcbQpa-70670cdb.so.5.15.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libQt5XcbQpa-70670cdb.so.5.15.0 (0x00007f7fa85ca000)
          	libfreetype-8d3bcff4.so.6.14.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libfreetype-8d3bcff4.so.6.14.0 (0x00007f7fa82fa000)
          	libz-d8a329de.so.1.2.7 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libz-d8a329de.so.1.2.7 (0x00007f7fa80e3000)
          	libQt5Gui-ca084835.so.5.15.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libQt5Gui-ca084835.so.5.15.0 (0x00007f7fa774c000)
          	libQt5Core-d92f2856.so.5.15.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libQt5Core-d92f2856.so.5.15.0 (0x00007f7fa6ff4000)
          	libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f7fa6f51000)
          	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7fa6f2e000)
          	libX11-xcb-1ae4fd0e.so.1.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libX11-xcb-1ae4fd0e.so.1.0.0 (0x00007f7fa6d2b000)
          	libxcb-icccm-413c9f41.so.4.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-icccm-413c9f41.so.4.0.0 (0x00007f7fa6b25000)
          	libxcb-image-e82a276d.so.0.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-image-e82a276d.so.0.0.0 (0x00007f7fa691d000)
          	libxcb-shm-7a199f70.so.0.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-shm-7a199f70.so.0.0.0 (0x00007f7fa6715000)
          	libxcb-keysyms-21015570.so.1.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-keysyms-21015570.so.1.0.0 (0x00007f7fa6511000)
          	libxcb-randr-a96a5a87.so.0.1.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-randr-a96a5a87.so.0.1.0 (0x00007f7fa62fa000)
          	libxcb-render-util-43ce00f5.so.0.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-render-util-43ce00f5.so.0.0.0 (0x00007f7fa60f4000)
          	libxcb-render-637b984a.so.0.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-render-637b984a.so.0.0.0 (0x00007f7fa5ee0000)
          	libxcb-shape-25c2b258.so.0.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-shape-25c2b258.so.0.0.0 (0x00007f7fa5cd8000)
          	libxcb-sync-89374f40.so.1.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-sync-89374f40.so.1.0.0 (0x00007f7fa5acf000)
          	libxcb-xfixes-9be3ba6f.so.0.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-xfixes-9be3ba6f.so.0.0.0 (0x00007f7fa58c3000)
          	libxcb-xinerama-ae147f87.so.0.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-xinerama-ae147f87.so.0.0.0 (0x00007f7fa56be000)
          	libxcb-xkb-9ba31ab3.so.1.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-xkb-9ba31ab3.so.1.0.0 (0x00007f7fa5497000)
          	libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f7fa546b000)
          	libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f7fa5456000)
          	libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f7fa5319000)
          	libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007f7fa530e000)
          	libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007f7fa52f0000)
          	libxkbcommon-x11-c65ed502.so.0.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxkbcommon-x11-c65ed502.so.0.0.0 (0x00007f7fa50e3000)
          	libxkbcommon-71ae2972.so.0.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxkbcommon-71ae2972.so.0.0.0 (0x00007f7fa4ea0000)
          	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7fa4e9a000)
          	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7fa4cb9000)
          	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7fa4b6a000)
          	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7fa4b4f000)
          	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7fa495d000)
          	libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f7fa4956000)
          	libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f7fa482d000)
          	libbz2-a273e504.so.1.0.6 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libbz2-a273e504.so.1.0.6 (0x00007f7fa461c000)
          	libpng15-c2ffaf3d.so.15.13.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libpng15-c2ffaf3d.so.15.13.0 (0x00007f7fa43ed000)
          	/lib64/ld-linux-x86-64.so.2 (0x00007f7fa887d000)
          	libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f7fa4335000)
          	libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f7fa42ff000)
          	libxcb-util-4d666913.so.1.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxcb-util-4d666913.so.1.0.0 (0x00007f7fa40f8000)
          	libXau-00ec42fe.so.6.0.0 => /home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libXau-00ec42fe.so.6.0.0 (0x00007f7fa3ef3000)
          	libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f7fa3eed000)
          	libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f7fa3ee5000)
          	libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f7fa3eda000)
          	libbsd.so.0 => /usr/lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f7fa3ec0000)
          	libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f7fa3e4d000)
          
          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @Herald_Poro

          loaded library "/home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins/platforms/libqxcb.so"
          QObject::moveToThread: Current thread (0x34c51b0) is not the object's thread (0x5512280).
          Cannot move to target thread (0x34c51b0)
          
          qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/<user>/.local/lib/python3.6/site-packages/cv2/qt/plugins" even though it was found.
          

          This is identical to the other thread. Except that you're Python 3.6 and the other is 3.9, same behaviour.

          I've put in a link from that thread to this one. I don't know what your answer is --- still hoping for an answer there --- but whatever it is seems like it is the same issue....

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

            Hi,

            What exactly did you install ? And how did you install it ?

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

            H 1 Reply Last reply
            0
            • SGaistS SGaist

              Hi,

              What exactly did you install ? And how did you install it ?

              H Offline
              H Offline
              Herald_Poro
              wrote on last edited by
              #6

              @SGaist said in PyQt5 and tensorflowlite causes crashes?:

              Hi,

              What exactly did you install ? And how did you install it ?

              I've only installed PyQt5 using pip and qt designer using sudo apt-get install qttools5-dev-tools and sudo apt-get install qttools5-dev

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

                How did you install tensorflowlite ?

                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