wikibaseintegrator.wbi_exceptions
- exception wikibaseintegrator.wbi_exceptions.MWApiError(error_dict)[source]
Bases:
Exception
Base class for MediaWiki API error handling
- Parameters:
error_dict (dict[str, Any])
- add_note()
Exception.add_note(note) – add a note to the exception
- args
-
code:
str
-
error_dict:
dict
[str
,Any
]
- property get_conflicting_entity_ids: list[str]
Compute the list of conflicting entities from the error messages.
- Returns:
A list of conflicting entities or an empty list
- property get_languages: list[str]
Compute a list of language identifiers from the error messages. Indicating the language which triggered the error.
- Returns:
A list of language identifiers or an empty list
-
info:
str
-
messages:
list
[dict
[str
,Any
]]
-
messages_names:
list
[str
]
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception wikibaseintegrator.wbi_exceptions.MaxRetriesReachedException[source]
Bases:
Exception
- __init__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception wikibaseintegrator.wbi_exceptions.MissingEntityException[source]
Bases:
Exception
- __init__(*args, **kwargs)
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception wikibaseintegrator.wbi_exceptions.ModificationFailed(error_dict)[source]
Bases:
MWApiError
When the API return a ‘modification-failed’ error
- Parameters:
error_dict (dict[str, Any])
- __init__(error_dict)
- Parameters:
error_dict (dict[str, Any])
- add_note()
Exception.add_note(note) – add a note to the exception
- args
-
code:
str
-
error_dict:
dict
[str
,Any
]
- property get_conflicting_entity_ids: list[str]
Compute the list of conflicting entities from the error messages.
- Returns:
A list of conflicting entities or an empty list
- property get_languages: list[str]
Compute a list of language identifiers from the error messages. Indicating the language which triggered the error.
- Returns:
A list of language identifiers or an empty list
-
info:
str
-
messages:
list
[dict
[str
,Any
]]
-
messages_names:
list
[str
]
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception wikibaseintegrator.wbi_exceptions.NonExistentEntityError(error_dict)[source]
Bases:
MWApiError
- Parameters:
error_dict (dict[str, Any])
- __init__(error_dict)
- Parameters:
error_dict (dict[str, Any])
- add_note()
Exception.add_note(note) – add a note to the exception
- args
-
code:
str
-
error_dict:
dict
[str
,Any
]
- property get_conflicting_entity_ids: list[str]
Compute the list of conflicting entities from the error messages.
- Returns:
A list of conflicting entities or an empty list
- property get_languages: list[str]
Compute a list of language identifiers from the error messages. Indicating the language which triggered the error.
- Returns:
A list of language identifiers or an empty list
-
info:
str
-
messages:
list
[dict
[str
,Any
]]
-
messages_names:
list
[str
]
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception wikibaseintegrator.wbi_exceptions.SaveFailed(error_dict)[source]
Bases:
MWApiError
When the API return a ‘save-failed’ error
- Parameters:
error_dict (dict[str, Any])
- add_note()
Exception.add_note(note) – add a note to the exception
- args
-
code:
str
-
error_dict:
dict
[str
,Any
]
- property get_conflicting_entity_ids: list[str]
Compute the list of conflicting entities from the error messages.
- Returns:
A list of conflicting entities or an empty list
- property get_languages: list[str]
Compute a list of language identifiers from the error messages. Indicating the language which triggered the error.
- Returns:
A list of language identifiers or an empty list
-
info:
str
-
messages:
list
[dict
[str
,Any
]]
-
messages_names:
list
[str
]
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.