There's this part of the code that reads:
except Exception, e:
print "Error reading id %s, exception: %s" % (kid, e)
return None
print "d.keys(): ", d.keys()
print "######## # OF STATUSES IN THIS GRAB: ", len(d['statuses'])
print "max_id VALUE USED FOR THIS GRAB-->", max_id
return d
The first line has an error that reads "invalid syntax." I have no idea how to fix that.