2012-06-29 1 views
0

파이썬의 AWeber API (https://github.com/aweber/AWeber-API-Python-Library)를 사용하고 있으며, 예외. 왜 이런 일이 일어 나는지 나는 모른다. 어떤 아이디어?Python AWeber API에서 예외가 발생했습니다. timestmap, nonce, consumer_key의 조합이 고유해야합니다.

File "/<path>/aweber_api/entry.py", line 160, in __getattr__ 
    return self._child_collection(attr) 

File "/<path>/aweber_api/entry.py", line 151, in _child_collection 
    self._child_collections[attr] = self.load_from_url(url) 

File "/<path>/aweber_api/base.py", line 38, in load_from_url 
    response = self.adapter.request('GET', url) 

File "/<path>/aweber_api/oauth.py", line 60, in request 
    '{0}: {1}'.format(error_type, error_msg)) 

APIException: UnauthorizedError: Combination of nonce, timestamp, and consumer_key must be unique. https://labs.aweber.com/docs/troubleshooting#unauthorized 

답변

1

오류 메시지는 실제로 OAuth 때문입니다. 같은 요청을 여러 번 보내고 있습니다. 새로운 타임 스탬프와 넌 스 (nonce)를 얻으려면 (동일한 명령과 매개 변수가 있더라도) 요청을 다시 생성해야합니다.

정확하게 동일한 요청을 여러 번 처리하지 못하도록 OAuth 측정 값입니다. 예 : 프로그램은 실제로 정확히 같은 시간에 명령을 두 번 보냅니다.

+0

응답 해 주셔서 감사합니다. Adam. 그것은 정말로 문제였습니다. – Rajat