openCV:qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "user" even though it was found.
Unsolved
General and Desktop
-
Hi,
We developed a program which displays images from a camera using cv2 library(imshow). This program is running fine when we executing it through terminal . But, when we tried to execute on bootup using crontab we getting the below error
qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/opt/MVS/Samples/64/Python/GrabImage/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. Aborted (core dumped)
we tried to debug our program using export QT_DEBUG_PLUGINS=1, below is the output
QFactoryLoader::QFactoryLoader() checking directory path "/opt/MVS/Samples/64/Python/GrabImage/cv2/qt/plugins" ... QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin" ... <Deleted few messages like the below one due to character limit> <QElfParser: '/usr/bin/2to3-2.7' is not an ELF object "'/usr/bin/2to3-2.7' is not an ELF object" not a plugin QFactoryLoader::QFactoryLoader() looking at "/usr/bin/2to3-3.5" QElfParser: '/usr/bin/2to3-3.5' is not an ELF object "'/usr/bin/2to3-3.5' is not an ELF object" not a plugin> QFactoryLoader::QFactoryLoader() checking directory path "/opt/MVS/Samples/64/Python/GrabImage/cv2/qt/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/opt/MVS/Samples/64/Python/GrabImage/cv2/qt/plugins/platforms/libqxcb.so" Found metadata in lib /opt/MVS/Samples/64/Python/GrabImage/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 "/usr/bin/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqeglfs.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqeglfs.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "eglfs" ] }, "className": "QEglFSIntegrationPlugin", "debug": false, "version": 329989 } Got keys from plugin meta data ("eglfs") QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqlinuxfb.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "linuxfb" ] }, "className": "QLinuxFbIntegrationPlugin", "debug": false, "version": 329989 } Got keys from plugin meta data ("linuxfb") QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqminimal.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 329989 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqminimalegl.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimalegl" ] }, "className": "QMinimalEglIntegrationPlugin", "debug": false, "version": 329989 } Got keys from plugin meta data ("minimalegl") QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqoffscreen.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 329989 } Got keys from plugin meta data ("offscreen") QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqvnc.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "vnc" ] }, "className": "QVncIntegrationPlugin", "debug": false, "version": 329989 } Got keys from plugin meta data ("vnc") QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqxcb.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "xcb" ] }, "className": "QXcbIntegrationPlugin", "debug": false, "version": 329989 } Got keys from plugin meta data ("xcb") loaded library "/opt/MVS/Samples/64/Python/GrabImage/cv2/qt/plugins/platforms/libqxcb.so"
Can you let us know what is causing this issue and how to resolve it,we want our python program to run on bootup?
-
@revathib said in openCV:qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "user" even though it was found.:
But, when we tried to execute on bootup using crontab we getting the below error
Is the X server running when the app is started?