已有184人关注
换了很多ip都不行啊
还有0人有此问题
发表在Python图书答疑 2019-10-06 《Python从入门到项目实践》
是否精华
版块置顶:

Traceback (most recent call last):

  File "C:\Users\51117\Anaconda3\lib\site-packages\urllib3\connection.py", line 159, in _new_conn

    (self._dns_host, self.port), self.timeout, **extra_kw)

  File "C:\Users\51117\Anaconda3\lib\site-packages\urllib3\util\connection.py", line 80, in create_connection

    raise err

  File "C:\Users\51117\Anaconda3\lib\site-packages\urllib3\util\connection.py", line 70, in create_connection

    sock.connect(sa)

TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "C:\Users\51117\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 594, in urlopen

    self._prepare_proxy(conn)

  File "C:\Users\51117\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 805, in _prepare_proxy

    conn.connect()

  File "C:\Users\51117\Anaconda3\lib\site-packages\urllib3\connection.py", line 301, in connect

    conn = self._new_conn()

  File "C:\Users\51117\Anaconda3\lib\site-packages\urllib3\connection.py", line 168, in _new_conn

    self, "Failed to establish a new connection: %s" % e)

urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x000001E31DE35F28>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "C:\Users\51117\Anaconda3\lib\site-packages\requests\adapters.py", line 449, in send

    timeout=timeout

  File "C:\Users\51117\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 638, in urlopen

    _stacktrace=sys.exc_info()[2])

  File "C:\Users\51117\Anaconda3\lib\site-packages\urllib3\util\retry.py", line 399, in increment

    raise MaxRetryError(_pool, url, error or ResponseError(cause))

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.baidu.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001E31DE35F28>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。')))


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "C:/Users/51117/PycharmProjects/untitled5/main.py", line 4, in <module>

    response = requests.get('https://www.baidu.com',proxies = proxy)

  File "C:\Users\51117\Anaconda3\lib\site-packages\requests\api.py", line 75, in get

    return request('get', url, params=params, **kwargs)

  File "C:\Users\51117\Anaconda3\lib\site-packages\requests\api.py", line 60, in request

    return session.request(method=method, url=url, **kwargs)

  File "C:\Users\51117\Anaconda3\lib\site-packages\requests\sessions.py", line 533, in request

    resp = self.send(prep, **send_kwargs)

  File "C:\Users\51117\Anaconda3\lib\site-packages\requests\sessions.py", line 646, in send

    r = adapter.send(request, **kwargs)

  File "C:\Users\51117\Anaconda3\lib\site-packages\requests\adapters.py", line 510, in send

    raise ProxyError(e, request=request)

requests.exceptions.ProxyError: HTTPSConnectionPool(host='www.baidu.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001E31DE35F28>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。')))


分享到:
精彩评论 1
小鹿晚晚
学分:76 LV3
2019-11-04
沙发

还是ip问题,多试试

首页上一页 1 下一页尾页 1 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照