Exceptions

This page contains all the Exceptions raised by the different methods

AuthenticationRequired

class AuthenticationRequired

Bases : Exception

Description:

This Exception is raised when you use a method which required the user to be authenticated.

Reference:

tweety.exceptions_.AuthenticationRequired

Attributes:
message: str = You need to be authenticated to make this request

Main Exception Message

error_code: int = 200

Exception Error Code

error_name: str = GenericForbidden

Twitter Internal Error Name

response: httpx.Response

Raw Response returned by the Twitter

UserNotFound

class UserNotFound

Bases : Exception

Description:

This Exception is raised when you use a method which required the user to be authenticated.

Reference:

tweety.exceptions_.UserNotFound

Attributes:
message: str = The User Account wasn't Found

Main Exception Message

error_code: int = 50

Exception Error Code

error_name: str = GenericUserNotFound

Twitter Internal Error Name

response: httpx.Response

Raw Response returned by the Twitter

InvalidTweetIdentifier

class InvalidTweetIdentifier

Bases : Exception

Description:

This Exception is raised when the tweet which is begin queried is not Found / Invalid.

Reference:

tweety.exceptions_.InvalidTweetIdentifier

Attributes:
message: str = The Tweet Identifier is Invalid

Main Exception Message

error_code: int = 144

Exception Error Code

error_name: str = StatusNotFound

Twitter Internal Error Name

response: httpx.Response

Raw Response returned by the Twitter

GuestTokenNotFound

class GuestTokenNotFound

Bases : Exception

Description:

This Exception is raised when guest token couldn’t be obtained.

Reference:

tweety.exceptions_.GuestTokenNotFound

Attributes:
message: str = The Guest Token couldn't be obtained

Main Exception Message

error_code: None = None

Exception Error Code

error_name: None = None

Twitter Internal Error Name

response: httpx.Response

Raw Response returned by the Twitter

UserProtected

class UserProtected

Bases : Exception

Description:

This Exception is raised when the user which is begin queried has private profile.This can be fixed by authenticating the request using cookies

Reference:

tweety.exceptions_.UserProtected

Attributes:
message: str = The User is Protected , please make sure you are authenticated and authorized

Main Exception Message

error_code: int = 403

Exception Error Code

error_name: str = UserUnavailable

Twitter Internal Error Name

response: httpx.Response

Raw Response returned by the Twitter

InvalidCredentials

class InvalidCredentials

Bases : Exception

Description:

This Exception is raised when the cookies provided for authentication are invalid

Reference:

tweety.exceptions_.InvalidCredentials

Attributes:
message: str = The Cookies are Invalid

Main Exception Message

error_code: int = 403

Exception Error Code

error_name: str = UserUnavailable

Twitter Internal Error Name

response: httpx.Response

Raw Response returned by the Twitter

RateLimitReached

class RateLimitReached

Bases : Exception

Description:

This Exception is raised when you have exceeded the Twitter Rate Limit

Reference:

tweety.exceptions_.RateLimitReached

Attributes:
message: str = You have exceeded the Twitter Rate Limit

Main Exception Message

error_code: int = 88

Exception Error Code

error_name: str = RateLimitExceeded

Twitter Internal Error Name

response: httpx.Response

Raw Response returned by the Twitter

DeniedLogin

class DeniedLogin

Bases : Exception

Description:

Exception Raised when the Twitter deny the login request , could be due to multiple login attempts (or failed attempts)

Reference:

tweety.exceptions_.DeniedLogin

Attributes:
message: str

Main Exception Message

error_code: int

Exception Error Code

error_name: str

Twitter Internal Error Name

response: httpx.Response

Raw Response returned by the Twitter

UnknownError

class UnknownError

Bases : Exception

Description:

This Exception is raised when a error unknown to Tweety occurs

Reference:

tweety.exceptions_.UnknownError

Attributes:
message: str

Main Exception Message

error_code: int

Exception Error Code

error_name: str

Twitter Internal Error Name

response: httpx.Response

Raw Response returned by the Twitter

ActionRequired

class ActionRequired

Bases : Exception

Description:

This Exception is raised when an additional step is required for Logging-in

Reference:

tweety.exceptions_.ActionRequired

Attributes:
message: str

Main Exception Message / Description of the Action to be performed

error_code: int

Exception Error Code

error_name: str

Twitter Internal Error Name

response: httpx.Response

Raw Response returned by the Twitter

ListNotFound

class ListNotFound

Bases : Exception

Description:

This Exception is raised when List queried is not Found

Reference:

tweety.exceptions_.ListNotFound

Attributes:
message: str

Main Exception Message / Description of the Action to be performed

error_code: int

Exception Error Code

error_name: str

Twitter Internal Error Name

response: httpx.Response

Raw Response returned by the Twitter

ProtectedTweet

class ProtectedTweet

Bases : Exception

Description:

This Exception is raised when queried Tweet is protected, and you need authorization to access it

Reference:

tweety.exceptions_.ProtectedTweet

Attributes:
message: str = "Tweet is private/protected"

Main Exception Message / Description of the Action to be performed

error_code: int

Exception Error Code

error_name: str

Twitter Internal Error Name

response: httpx.Response

Raw Response returned by the Twitter

ProxyParseError

class ProxyParseError

Bases : Exception

Description:

This Exception is raised when Proxy Format is Irregular

Reference:

tweety.exceptions_.ProxyParseError

Attributes:
message: str

Main Exception Message / Description of the Action to be performed