Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QObject::moveToThread: Current thread (0x55c07be39a60) is not the object's thread (0x55c07c164490). Cannot move to target thread (0x55c07be39a60) #11

Closed
danmeng90 opened this issue Jun 15, 2018 · 14 comments

Comments

@danmeng90
Copy link

Hello, Liu:

I am running your code on Ubuntu16.04, however, when I run python demo.py, the following two lines showed repeatedly:

QObject::moveToThread: Current thread (0x55c07be39a60) is not the object's thread (0x55c07c164490).
Cannot move to target thread (0x55c07be39a60)

Is it a normal phenomenon or there's something wrong with my operation? Thank you for your time.

                                                                                                                                 Dan Meng
@Yuliang-Liu
Copy link
Owner

Hi there:

I have tested the code on several computers, but the error didn't occur.
Could you show more details about the error logs?

@jungwon-choi
Copy link

I was able to fix this problem by installing new pyqt.

if you are using anaconda, just write down below:

$ conda install pyqt

@theRealSuperMario
Copy link

I was able to fix this problem by installing new pyqt.

if you are using anaconda, just write down below:

$ conda install pyqt

I can confirm that. A working combination seems to be opencv-python==4.1.0.25 and pyqt 5.9.2

@WaseemSabir
Copy link

opencv-python==4.1.0.25 is not available for anaconda environment on Ubuntu. the version opencv-python==4.3.0.36 and above pyqt version 5.9.2 works fine! solved the issue for me!

@schauppi
Copy link

I resolved this error by downgrading from opencv-python 4.5.1.48 to opencv-python 4.3.0.36 with PyQt5 5.15.2 installed.

@Nurullah1313
Copy link

Thank you very much thanks to @schauppi, I solved it

@mikechen66
Copy link

I was able to fix this problem by installing new pyqt.
if you are using anaconda, just write down below:
$ conda install pyqt

I can confirm that. A working combination seems to be opencv-python==4.1.0.25 and pyqt 5.9.2

It does not help me out. It has repeated the same error.

@YunfeiZHAO
Copy link

make be change cv2.waitKey(0) to cv2.waitKey(1) can solve your problem

@HosikChae
Copy link

HosikChae commented May 30, 2021

I resolved this error by downgrading from opencv-python 4.5.1.48 to opencv-python 4.3.0.36 with PyQt5 5.15.2 installed.

python3.6, opencv-python==4.3.0.36, pyqt5==5.15.2 worked for me.
(opencv-python==4.3.0.38 and all above didn't work)

@CharlesNord
Copy link

Python3.8, ubuntu 18.04.1 ,

pip install opencv-python==4.2.0.32

solves my problem

@daigz1224
Copy link

Python 3.8, Ubuntu 18.04, Conda Environment,
I resolved this error by removing opencv-python installed by pip, and use opencv installed by conda instead.

@fatbringer
Copy link

I am unable to downgrade my opencv, what options do I have ?

ERROR: Could not find a version that satisfies the requirement opencv-python==4.2.0.32
ERROR: No matching distribution found for opencv-python==4.2.0.32

and

ERROR: Could not find a version that satisfies the requirement 4.3.0.36
ERROR: No matching distribution found for 4.3.0.36

@itsbvk
Copy link

itsbvk commented Apr 3, 2022

I am unable to downgrade my opencv, what options do I have ?

ERROR: Could not find a version that satisfies the requirement opencv-python==4.2.0.32
ERROR: No matching distribution found for opencv-python==4.2.0.32

and

ERROR: Could not find a version that satisfies the requirement 4.3.0.36
ERROR: No matching distribution found for 4.3.0.36

@fatbringer 4.3.0.36 is compatible for only certain python versions. Check your python version against the available builds.. https://pypi.org/project/opencv-python/4.3.0.36/

@RamaKrishnaMarri
Copy link

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
QObject::moveToThread: Current thread (0x261a670) is not the object's thread (0x3cd8880).
Cannot move to target thread (0x261a670)

QObject::moveToThread: Current thread (0x261a670) is not the object's thread (0x3cd8880).
Cannot move to target thread (0x261a670)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests