兄弟們看看是不是這個(gè)錯(cuò):
QObject::moveToThread: Current thread (0xe5205f0) is not the object's thread (0xa14d0f0).
Cannot move to target thread (0xe5205f0)
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/xxx/python3.8/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.
VScode 80年不出個(gè)錯(cuò),今兒冒出來這個(gè),我也不知道是mmdet配置問題,還是opencv-python的問題,還是VScode的問題hhhh
參考該鏈接:
https://blog.csdn.net/LOVEmy134611/article/details/107212845
把QT的flag打開,我們才能看到報(bào)錯(cuò)的詳細(xì)信息
export QT_DEBUG_PLUGINS=1
注意,這個(gè)執(zhí)行后,該環(huán)境變量只在當(dāng)前終端有效,關(guān)了這個(gè)終端就失效了,當(dāng)然你也可以寫到.bashrc
里
然后就整出一個(gè)超級(jí)長(zhǎng)的報(bào)錯(cuò):
QFactoryLoader::QFactoryLoader() checking directory path "xxxxminiconda3/envs/tor38/lib/python3.8/site-packages/cv2/qt/plugins" ...
QFactoryLoader::QFactoryLoader() checking directory path "xxxxminiconda3/envs/tor38/lib/python3.8/site-packages/PyQt5/Qt5/plugins" ...
QFactoryLoader::QFactoryLoader() checking directory path "xxxxminiconda3/envs/tor38/bin" ...
QFactoryLoader::QFactoryLoader() looking at "xxxxminiconda3/envs/tor38/bin/2to3"
QElfParser: 'xxxxminiconda3/envs/tor38/bin/2to3-3.8' is not an ELF object
"'xxxxminiconda3/envs/tor38/bin/2to3-3.8' is not an ELF object"
not a plugin
QFactoryLoader::QFactoryLoader() looking at "xxxxminiconda3/envs/tor38/bin/2to3-3.8"
......
QFactoryLoader::QFactoryLoader() looking at "xxxxminiconda3/envs/tor38/bin/yapf"
QElfParser: 'xxxxminiconda3/envs/tor38/bin/yapf' is not an ELF object
"'xxxxminiconda3/envs/tor38/bin/yapf' is not an ELF object"
not a plugin
QFactoryLoader::QFactoryLoader() looking at "xxxxminiconda3/envs/tor38/bin/yapf-diff"
QElfParser: 'xxxxminiconda3/envs/tor38/bin/yapf-diff' is not an ELF object
"'xxxxminiconda3/envs/tor38/bin/yapf-diff' is not an ELF object"
not a plugin
QFactoryLoader::QFactoryLoader() checking directory path "xxxxminiconda3/envs/tor38/lib/python3.8/site-packages/cv2/qt/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "xxxxminiconda3/envs/tor38/lib/python3.8/site-packages/cv2/qt/plugins/platforms/libqxcb.so"
Found metadata in lib xxxxminiconda3/envs/tor38/lib/python3.8/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 ("webgl")
QFactoryLoader::QFactoryLoader() looking at "xxxxminiconda3/envs/tor38/lib/python3.8/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so"
Found metadata in lib xxxxminiconda3/envs/tor38/lib/python3.8/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 "xxxxminiconda3/envs/tor38/bin/platforms" ...
loaded library "xxxxminiconda3/envs/tor38/lib/python3.8/site-packages/cv2/qt/plugins/platforms/libqxcb.so"
QObject::moveToThread: Current thread (0x5eeb0e0) is not the object's thread (0xb291550).
Cannot move to target thread (0x5eeb0e0)
......
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "xxxxminiconda3/envs/tor38/lib/python3.8/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.
參考該鏈接:
https://github.com/google/mediapipe/issues/1373
與這哥們報(bào)的錯(cuò)誤差不多
這位大哥這樣做的
當(dāng)然你也可以在環(huán)境變量中添加:
export DISPLAY=:0
launch.json 中這樣添加
解決是解決了,但是給我整出來一個(gè)文章來源:http://www.zghlxwxcb.cn/news/detail-494559.html
Invalid MIT-MAGIC-COOKIE-1 Key(環(huán)境變量名字)
暫時(shí)不影響文章來源地址http://www.zghlxwxcb.cn/news/detail-494559.html
到了這里,關(guān)于qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!