예외

tweepy 모듈에서 직접 예외를 사용할 수 있으므로, 굳이 tweepy.errors 자체를 불러오거나 임포트(Import)할 필요는 없습니다. 예로, tweepy.errors.TweepyExceptiontweepy.TweepyException. 로도 사용이 가능합니다.

exception tweepy.errors.TweepyException

기반 클래스: Exception

Tweepy의 기본 예외.

버전 4.0에 추가.

exception tweepy.errors.HTTPException

기반 클래스: tweepy.errors.TweepyException

HTTP 요청 실패 시 발생하는 예외.

버전 4.0에 추가.

버전 4.10에서 변경: response attribute can be an instance of aiohttp.ClientResponse

response

트위터 API로의 요청에 대한 응답

타입

requests.Response | aiohttp.ClientResponse

api_errors

트위터 API가 응답과 같이 반환한 오류 (있는 경우에만)

타입

list[dict[str, int | str]]

api_codes

트위터 API가 응답과 같이 반환한 오류 코드 (있는 경우에만)

타입

list[int]

api_messages

트위터 API가 응답과 같이 반환한 오류 메세지 (있는 경우에만)

타입

list[str]

exception tweepy.errors.BadRequest

기반 클래스: tweepy.errors.HTTPException

HTTP 400에 의해 발생하는 예외.

버전 4.0에 추가.

exception tweepy.errors.Unauthorized

기반 클래스: tweepy.errors.HTTPException

HTTP 401에 의해 발생하는 예외.

버전 4.0에 추가.

exception tweepy.errors.Forbidden

기반 클래스: tweepy.errors.HTTPException

HTTP 403에 의해 발생하는 예외.

버전 4.0에 추가.

exception tweepy.errors.NotFound

기반 클래스: tweepy.errors.HTTPException

HTTP 404에 의해 발생하는 예외.

버전 4.0에 추가.

exception tweepy.errors.TooManyRequests

기반 클래스: tweepy.errors.HTTPException

HTTP 429에 의해 발생하는 예외.

버전 4.0에 추가.

exception tweepy.errors.TwitterServerError

기반 클래스: tweepy.errors.HTTPException

HTTP 5xx에 의해 발생하는 예외.

버전 4.0에 추가.