Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue while fetching comments #6

Closed
kadnan opened this issue Aug 5, 2016 · 1 comment
Closed

Issue while fetching comments #6

kadnan opened this issue Aug 5, 2016 · 1 comment

Comments

@kadnan
Copy link

kadnan commented Aug 5, 2016

hn = HackerNews()
who_is_hiring = hn.get_item(12202865)
for comment_id in who_is_hiring.kids:
    print('processing:- '+str(comment_id))
    comment = hn.get_item(comment_id) #this line caused the error
    if comment.text is not None:
        cleantext = BeautifulSoup(comment.text.lower(),'lxml').text.strip()
        comments.append(cleantext)

Error is:

Traceback (most recent call last):
  File "/anaconda3/anaconda/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 331, 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 "/anaconda3/anaconda/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 516, in urlopen
    body=body, headers=headers)
  File "/anaconda3/anaconda/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 333, in _make_request
    httplib_response = conn.getresponse()
  File "/anaconda3/anaconda/lib/python3.5/http/client.py", line 1197, in getresponse
    response.begin()
  File "/anaconda3/anaconda/lib/python3.5/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/anaconda3/anaconda/lib/python3.5/http/client.py", line 266, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/anaconda3/anaconda/lib/python3.5/site-packages/requests/adapters.py", line 362, in send
    timeout=timeout
  File "/anaconda3/anaconda/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 559, in urlopen
    _pool=self, _stacktrace=stacktrace)
  File "/anaconda3/anaconda/lib/python3.5/site-packages/requests/packages/urllib3/util/retry.py", line 245, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/anaconda3/anaconda/lib/python3.5/site-packages/requests/packages/urllib3/packages/six.py", line 309, in reraise
    raise value.with_traceback(tb)
  File "/anaconda3/anaconda/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 516, in urlopen
    body=body, headers=headers)
  File "/anaconda3/anaconda/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 333, in _make_request
    httplib_response = conn.getresponse()
  File "/anaconda3/anaconda/lib/python3.5/http/client.py", line 1197, in getresponse
    response.begin()
  File "/anaconda3/anaconda/lib/python3.5/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/anaconda3/anaconda/lib/python3.5/http/client.py", line 266, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))

During handling of the above exception, another exception occurred:
@avinassh
Copy link
Owner

Somehow I forgot to respond. Now I cannot reproduce this error. If you still have any issues, then re-open and tell me steps to reproduce this issue.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants