Open Samuel-wei opened 1 year ago
Another thread inhttps://github.com/SharebeeClub/TCP-IP-CR-Python-CMD/issues/7
@JiangkuoWang 问题的原因大概在这个方向上https://github.com/SharebeeClub/TCP-IP-CR-Python-CMD/issues/7 Solving method: http://icejoywoo.github.io/2019/03/15/python-broken-pipe-error.html
# 方法1:捕获异常
import sys, errno
try:
### IO operation ###
except IOError as e:
if e.errno == errno.EPIPE:
### Handle error ###
# 方法2:忽略信号
from signal import signal, SIGPIPE, SIG_DFL, SIG_IGN
signal(SIGPIPE, SIG_IGN)
# 恢复默认信号行为的方法
# signal(SIGPIPE, SIG_DFL)
From:https://github.com/Dobot-Arm/TCP-IP-Nova-Python or: https://github.com/Dobot-Arm/TCP-IP-CR-Python-CMD Output error: