Friend data collection fails: BadStatusLine

Bug #524848 reported by tomribbens on 2010-02-20
This bug report is a duplicate of:  Bug #523378: Connection reset by peer. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Facebook Friends Graph
Medium
Kamran Riaz Khan

Bug Description

Another error thrown by the HTTP library. The output shown is using the testing branch, but i've also experienced this with the normal branch.

Please just catch any exception the library throws back, and just try again. I have more than 700 friends on facebook, and I never am able to get past the data collection step.

tom@laptop-tom:~/fbfriends/testing$ ./fbfriendsgraph.py
/home/tom/fbfriends/testing/facebook/__init__.py:47: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
Made 10 requests in a minute
Delaying for 40.5372271538 seconds
Continuing
Made 10 requests in a minute
Delaying for 40.5656991005 seconds
Continuing
Made 10 requests in a minute
Delaying for 40.9173250198 seconds
Continuing
Made 10 requests in a minute
Delaying for 39.765914917 seconds
Continuing
Made 10 requests in a minute
Delaying for 40.516671896 seconds
Continuing
Made 10 requests in a minute
Delaying for 40.636826992 seconds
Continuing
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner
    self.run()
  File "./fbfriendsgraph.py", line 151, in run
    iconnections = self.fb.friends.areFriends(ilist, myfriends)
  File "<string>", line 6, in areFriends
  File "/home/tom/fbfriends/testing/facebook/__init__.py", line 517, in __call__
    return self._client('%s.%s' % (self._name, method), args)
  File "/home/tom/fbfriends/testing/facebook/__init__.py", line 1000, in __call__
    response = urlread(self.facebook_url, post_data)
  File "/home/tom/fbfriends/testing/facebook/__init__.py", line 101, in urlread
    res = urllib2.urlopen(url, data=data)
  File "/usr/lib/python2.6/urllib2.py", line 124, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.6/urllib2.py", line 389, in open
    response = self._open(req, data)
  File "/usr/lib/python2.6/urllib2.py", line 407, in _open
    '_open', req)
  File "/usr/lib/python2.6/urllib2.py", line 367, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.6/urllib2.py", line 1146, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.6/urllib2.py", line 1119, in do_open
    r = h.getresponse()
  File "/usr/lib/python2.6/httplib.py", line 974, in getresponse
    response.begin()
  File "/usr/lib/python2.6/httplib.py", line 391, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.6/httplib.py", line 355, in _read_status
    raise BadStatusLine(line)
BadStatusLine

Kamran Riaz Khan (inspirated) wrote :

Rev 5 in the testing branch tries to catch all exceptions and retry API calls. Please check it out and report if the issue is resolved.

Changed in fbfriendsgraph:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Kamran Riaz Khan (inspirated)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers