From 5e79f33ed45e93d122aadf3866100e5f12b66eaf Mon Sep 17 00:00:00 2001 From: electro199 Date: Mon, 20 Feb 2023 13:52:30 +0500 Subject: [PATCH] error fix in tiktokexception --- TTS/TikTok.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TTS/TikTok.py b/TTS/TikTok.py index 2bcbd6d..3f6752e 100644 --- a/TTS/TikTok.py +++ b/TTS/TikTok.py @@ -147,7 +147,7 @@ class TikTok: class TikTokTTSException(Exception): - def __init__(self, code: int, message: str): + def __init__(self, code: int, message: str=""): self._code = code self._message = message @@ -162,6 +162,6 @@ class TikTokTTSException(Exception): return f"Code: {self._code}, reason: the speaker doesn't exist, message: {self._message}" if self._code == 5: - return f"You have to add session id in config to use titok TTS" + return "You have to add session id in config to use titok TTS" return f"Code: {self._message}, reason: unknown, message: {self._message}"