2013-07-26 4 views
0
api = twitter.Api(consumer_key='aaa',consumer_secret='aaa', access_token_key='aaa', access_token_secret='aaa') 

followers=api.GetFollowerIDs() 

코드가 4 일 전에 작동했습니다. 그러나 갑자기 일하러 나가십시오. 아래에 오류가 있습니다. 나는 python-twitter를 사용하고 있습니다. 그 이유는 무엇입니까?GetFollowerIDs 함수가 더 이상 작동하지 않습니다.

Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "/usr/local/lib/python2.7/dist-packages/python_twitter-1.0.1-py2.7.egg/twitter.py", line 3320, in GetFollowerIDs 
    total_count -= len(data['ids']) 
TypeError: unsupported operand type(s) for -=: 'NoneType' and 'int' 

편집 : 모든 코드가 위에 있습니다. 3-4 일 전에 제대로 작동하는 코드였습니다.

EDIT2 : 원하는 경우 여기에서 오류 라인을 볼 수 있습니다. 그 라이브러리를 사용하고 있습니다. 여기에 무슨 일이 일어나고 무엇 https://github.com/bear/python-twitter/blob/master/twitter.py

+0

로 설정되어,이 같은 오류가 구현 및 API 사이 desync에 대한 가능성이 후보입니다. Twitters changelog를 확인하여 최근 변경된 사항이 있는지 확인하십시오. –

+0

total_count가 아무 것도 아닌 것 같습니다. 나머지 코드는 게시 할 수 있습니까? –

답변

0

:

a = None 
a -= 5 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
TypeError: unsupported operand type(s) for -=: 'NoneType' and 'int' 

이 어떤 이유로 당신의 total_count 변수가 일반적으로 없음

관련 문제