I'm wondering if there is a way to detect physical disconnection of a device while serial communication is open? Is the only way to write try-except code whenever data is sent?
Use pyserial isopen() which return a Boolean value if it is open or not.
   Import serial
ser = Serial.Serial("your serial info")
   Ser.isOpen()
How to detect when a device is disconnected while serial communication is open?