Another problem which might happen in python is that you can not see the errors which occur inside messageReceive. This is because messageReceive is called by a separate thread, it has its own stack, if the error happens python wont print you any stack trace.
Please try to wrap the code in messageReceive inside "try ".
Please check my example below.
