9
votes

I am getting this error whenever I call cv::waitKey():

ASSERT: "false" in file qasciikey.cpp, line 501

I am not sure why I am getting this error. I am running on an Ubuntu Server 14.04 EC2 instance connected through MobaXterm on Windows. If I run all of the same code on a normal ubuntu machine, all works great.

This is the line where this happens:

char key = cvWaitKey(33);
3
When i originally build OpenCV I used the flag WITH_QT=ON. I simply ended up building OpenCV with WITH_QT=OFF and it worked great.Georgi Angelov
I got the error when didn't change my keyboard to English.George
I got the same error in the same circumstance. It does not always happen.user0814

3 Answers

11
votes

A workaround in MobaXterm is to uncheck "Unix-compatible keyboard" in X11 settings.

4
votes

Try this.

pip install qtconsole

I solve the problem.

2
votes

I am not trying to get the glory here but I think this deserves a proper answer.

As @George mentioned in the comment when my input was not from an English keyboard but used some other locale then this error occurs. I have seen other proposed reasons for this error but I guess this is a quite usual case since the error reports:

ASSERT: "false"