Arduino Python Pyserial stop receiving data after some time

I have Arduino connected to PC via serial. on PC i have python and using Pyserial library.
it is working fine but after some minutes PC don't receive anything .

I have TV pult when I press volume up Arduino reads signal sends signal hex code to serial , python reads hex code and volume is up but after some time it don't volume up or other functions also not work.

Are you sure the Arduino is at fault here?

@gtaplashvili Installation and Troubleshooting is for Problems with the Arduino itself NOT your project. It says so in the description of the section. Therefore I have moved your post here.

You may want to read this before you proceed:-
how to get the best out of this forum