error:requests.exceptions.ConnectionError

时间:2015-03-15 08:38:42

标签: python http sharepoint python-requests

我尝试用两种方式连接共享点:

#one way 
server_url = 'http://*****/'
site_url = server_url + '*****'
opener.open(server_url)
opener = basic_auth_opener(server_url,'****', '******')

#another way
from requests.auth import HTTPBasicAuth
reportReq = requests.get('%s:%d/' % ('http://*******', 80),     auth=HTTPBasicAuth('*****', '****'), verify=True)

这是错误:

requests.exceptions.ConnectionError: HTTPConnectionPool(host='***', port=80): (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known)

0 个答案:

没有答案