URLError: <urlopen error [Errno 10061] >


Traceback (most recent call last):
File "C:\Users\zhoulei\Desktop\appraisesys\unittt.py", line 188, in test_appraise_order
self.post_browser('/v1/appraise_order/app_add', 'appraise_order_1 unsupport args', dfa=123)
File "C:\Users\zhoulei\Desktop\appraisesys\unittt.py", line 170, in post_browser
data = urllib2.urlopen(url, data=arg).read()
File "C:\Python27\lib\urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "C:\Python27\lib\urllib2.py", line 429, in open
response = self._open(req, data)
File "C:\Python27\lib\urllib2.py", line 447, in _open
'_open', req)
File "C:\Python27\lib\urllib2.py", line 407, in _call_chain
result = func(*args)
File "C:\Python27\lib\urllib2.py", line 1228, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "C:\Python27\lib\urllib2.py", line 1198, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 10061] >

测试代码的时候出现这个问题,是因为服务器并没有启动导致错误。 10061 因为目标主机主动拒绝,连接不能建立。这通常是因为试图连接到一个远程主机上不活动的服务,如没有服务器应用程序处于执行状态

posted @ 2016-11-09 10:05  紫金龙骑  阅读(658)  评论(0编辑  收藏  举报
UV PV