Python 3.5 socket OSError: [Errno 101] Network is unreachable
/********************************************************************************
* Python 3.5 socket OSError: [Errno 101] Network is unreachable
* 说明:
* 在网络状态一切正常的时候没有出现这个问题,当出现比较长时间的网络连接中断
* 的情况下,会出现这个现象,try...except...解决。
*
* 2017-3-1 深圳 南山平山村 曾剑锋
********************************************************************************/ 一、错误现象:
Traceback (most recent call last):
File "localDetect.py", line , in <module>
socketClient.sendto(mac.encode('utf-8'), address)
OSError: [Errno ] Network is unreachable []+ Done() python localDetect.py 二、错误原因:
网络状态不好,socket的sendto等待超时。
Python 3.5 socket OSError: [Errno 101] Network is unreachable的更多相关文章
- python使用open的OSError: [Errno 22] Invalid argument错误
这两天在写一个新闻类的spider时,遇到了OSError: [Errno 22] Invalid argument这个错误,苦恼的两天,无果.后来通过请教学长,发现原来是打开的文件名中含有一些系统的 ...
- Python学习:socket.gaierror: [Errno -8]
在终端内打开python模式,利用如下代码查询本机hostname,这里举例为“xxMacBookPro.local”: import socket socket.gethostname() 在/et ...
- macosx 10.11 python pip install 出现错误OSError: [Errno 1] Operation not permitted:
Exception: Traceback (most recent call last): File , in main status = self.run(options, args) File , ...
- python socket.error: [Errno 10054] 解决方法
我用的是python2.7 我搜网上10054错误解决方法的时候发现,大部分文章都是以python3为基础的,对于python2不适用. python socket.error: [Errno 1 ...
- python socket.error: [Errno 24] Too many open files
以openwrt AR9331开发板为例,socket连接到1019个就报错 “python socket.error: [Errno 24] Too many open files” 1.查看开发板 ...
- 错误:OSError: [Errno 1] Operation not permitted: 'lib/python/six-1.4.1-py2.7.egg-info'
解决办法: $ $ pip install mock --ignore-installed six --user 问题:安装mock时报错: (venv)➜ test git:(master) pip ...
- mac下载模块时报错OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/chardet'
原文地址:https://www.cnblogs.com/liangyan-1989/p/8143129.html 安装完pip后,使用pip install selenium报以下错 OSError ...
- 在使用python语言的open函数时,提示错误OSError: [Errno 22] Invalid argument: ‘文件路径’
如题,在使用python语言的open函数时,提示错误OSError: [Errno 22] Invalid argument: '文件路径',在查阅了大量资料后也得到了一些解决方案,但是这些解决方案 ...
- python web开发遇到socket.error[errno 10013]
socket.error[errno 10013],端口被占用 重新换一个端口,或者把占用该端口的程序关闭就可以了
随机推荐
- "深入理解C语言" 指针
本文对coolshell中的"深入理解C语言"这篇文章中提到的指针问题, 进行简要的分析. #include <stdio.h> int main(void){ ]; ...
- 学好 Python 的 11 个优秀资源
Python是目前最流行.最易学最强大的编程语言之一,无论你是新手还是老鸟,无论是用于机器学习还是web开发(Pinterest就是案例),Python都是一件利器.此外,Python不但人气日益高涨 ...
- 【leetcode刷题笔记】Wildcard Matching
Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single character. ...
- Squid 安装
Squid简介 Squid是比较知名的代理软件,它不仅可以跑在linux上还可以跑在windows以及Unix上,它的技术已经非常成熟.目前使用Squid的用户也是十分广泛的.Squid与Linux下 ...
- 主攻ASP.NET MVC4.0之重生:上下滑动屏幕动态加载数据
@{ ViewBag.Title = "Index"; } <!DOCTYPE html> <html> <head> ...
- goseq
goseq是一个R包,用于寻找GO terms,即基因富集分析. GO terms是标准化描述基因或基因产物的词汇,包括三方面,cellular component,molecular funcito ...
- 七、golang中接口、反射
一.接口定义 1.定义 interface类型可以定义一组方法,但是这些不需要实现,并且interface不能包含任何变量 package main import ( "fmt" ...
- juniper设置共享上网(注意事项)
注意:出去的 策略 ,勾上 NAT 选项
- oracle 序列改值
1.oracle 序列改值 执行:Alter Sequence SQ_RM_FRAME Increment By 100; 执行:Select SQ_RM_FRAME.NextVal From Dua ...
- Eclipse4.2安装样式插件
1.插件地址 http://eclipse-color-theme.github.com/update 点击Eclipse菜单 Help>>Install New Software... ...