Bluetooth programming using python

Hi,
I have created a RMCOMM port. In my program I am sending some data from device1 to device2 and receiving some data from device2 to device1.
But after sending data to device2 when device1 waits for data to arrive from device2 I am always getting the follwing problem.