/******************************************************************************** * Python 3.5 socket OSError: [Er Rno 101] Network is unreachable * Description: * In the network state all normal time did not appear this problem, when there is a relatively long time network connection interrupted *, this phenomenon will occur, try...except ... Solve. * 2017-3-1 Shenzhen Nanshan Ping Shan village Zengjianfeng *************************************************** *****************************/first, the error phenomenon: Traceback (most recent call last): File"localdetect.py", line A,inch<module>socketclient.sendto (Mac.encode ('Utf-8'), address) OSError: [Errno101] Network isUnreachable [1]+ Done (1python localdetect.py Second, error reason: Network status is not good, socket sendto wait timeout.
Python 3.5 Socket OSError: [Errno 101] Network is unreachable