Closed taivop closed 9 years ago
Also: Traceback (most recent call last): File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 544, in urlopen body=body, headers=headers) File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 349, in _make_request conn.request(method, url, _httplib_request_kw) File "C:\Python34\lib\http\client.py", line 1088, in request self._send_request(method, url, body, headers) File "C:\Python34\lib\http\client.py", line 1126, in _send_request self.endheaders(body) File "C:\Python34\lib\http\client.py", line 1084, in endheaders self._send_output(message_body) File "C:\Python34\lib\http\client.py", line 922, in _send_output self.send(msg) File "C:\Python34\lib\http\client.py", line 857, in send self.connect() File "C:\Python34\lib\site-packages\requests\packages\urllib3\connection.py", line 155, in connect conn = self._new_conn() File "C:\Python34\lib\site-packages\requests\packages\urllib3\connection.py", line 134, in _new_conn (self.host, self.port), self.timeout, _extra_kw) File "C:\Python34\lib\site-packages\requests\packages\urllib3\util\connection.py", line 88, in create_connection raise err File "C:\Python34\lib\site-packages\requests\packages\urllib3\util\connection.py", line 78, in create_connection sock.connect(sa) TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Python34\lib\site-packages\requests\adapters.py", line 370, in send timeout=timeout File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 597, in urlopen _stacktrace=sys.exc_info()[2]) File "C:\Python34\lib\site-packages\requests\packages\urllib3\util\retry.py", line 245, in increment raise six.reraise(type(error), error, _stacktrace) File "C:\Python34\lib\site-packages\requests\packages\urllib3\packages\six.py", line 309, in reraise raise value.with_traceback(tb) File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 544, in urlopen body=body, headers=headers) File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 349, in _make_request conn.request(method, url, _httplib_request_kw) File "C:\Python34\lib\http\client.py", line 1088, in request self._send_request(method, url, body, headers) File "C:\Python34\lib\http\client.py", line 1126, in _send_request self.endheaders(body) File "C:\Python34\lib\http\client.py", line 1084, in endheaders self._send_output(message_body) File "C:\Python34\lib\http\client.py", line 922, in _send_output self.send(msg) File "C:\Python34\lib\http\client.py", line 857, in send self.connect() File "C:\Python34\lib\site-packages\requests\packages\urllib3\connection.py", line 155, in connect conn = self._new_conn() File "C:\Python34\lib\site-packages\requests\packages\urllib3\connection.py", line 134, in _new_conn (self.host, self.port), self.timeout, _extra_kw) File "C:\Python34\lib\site-packages\requests\packages\urllib3\util\connection.py", line 88, in create_connection raise err File "C:\Python34\lib\site-packages\requests\packages\urllib3\util\connection.py", line 78, in create_connection sock.connect(sa) requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', TimeoutError(10060, 'A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond', None, 10060, None))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/Taivo/PycharmProjects/postimees/src/scrape_articles_csv.py", line 17, in
Traceback (most recent call last): File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 372, in _make_request httplib_response = conn.getresponse(buffering=True) TypeError: getresponse() got an unexpected keyword argument 'buffering'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 544, in urlopen body=body, headers=headers) File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 374, in _make_request httplib_response = conn.getresponse() File "C:\Python34\lib\http\client.py", line 1171, in getresponse response.begin() File "C:\Python34\lib\http\client.py", line 351, in begin version, status, reason = self._read_status() File "C:\Python34\lib\http\client.py", line 321, in _read_status raise BadStatusLine(line) http.client.BadStatusLine: ''
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Python34\lib\site-packages\requests\adapters.py", line 370, in send timeout=timeout File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 597, in urlopen _stacktrace=sys.exc_info()[2]) File "C:\Python34\lib\site-packages\requests\packages\urllib3\util\retry.py", line 245, in increment raise six.reraise(type(error), error, _stacktrace) File "C:\Python34\lib\site-packages\requests\packages\urllib3\packages\six.py", line 309, in reraise raise value.with_traceback(tb) File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 544, in urlopen body=body, headers=headers) File "C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 374, in _make_request httplib_response = conn.getresponse() File "C:\Python34\lib\http\client.py", line 1171, in getresponse response.begin() File "C:\Python34\lib\http\client.py", line 351, in begin version, status, reason = self._read_status() File "C:\Python34\lib\http\client.py", line 321, in _read_status raise BadStatusLine(line) requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', BadStatusLine("''",))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:/Users/Taivo/PycharmProjects/postimees/src/scrape_articles_csv.py", line 16, in
a = Article.get_article(article_id)
File "C:\Users\Taivo\PycharmProjects\postimees\src\article.py", line 61, in get_article
page = requests.get(url)
File "C:\Python34\lib\site-packages\requests\api.py", line 69, in get
return request('get', url, params=params, _kwargs)
File "C:\Python34\lib\site-packages\requests\api.py", line 50, in request
response = session.request(method=method, url=url, _kwargs)
File "C:\Python34\lib\site-packages\requests\sessions.py", line 465, in request
resp = self.send(prep, _send_kwargs)
File "C:\Python34\lib\site-packages\requests\sessions.py", line 573, in send
r = adapter.send(request, _kwargs)
File "C:\Python34\lib\site-packages\requests\adapters.py", line 415, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))