python except捕捉b' ISO : An error occurred during recv TCP : Connection timed out'这个问题
时间: 2023-05-11 08:07:17 浏览: 387
TC 编译连接错误提示信息
可以使用以下代码来捕捉这个异常:
try:
# some code that may raise the exception
except Exception as e:
if isinstance(e.args[0], bytes) and b'ISO : An error occurred during recv TCP : Connection timed out' in e.args[0]:
# handle the exception
else:
# re-raise the exception
阅读全文