diff --git a/TTS/TikTok.py b/TTS/TikTok.py index 543568f..b370455 100644 --- a/TTS/TikTok.py +++ b/TTS/TikTok.py @@ -108,7 +108,11 @@ class TikTok: raise TikTokTTSException(status_code, data["message"]) # decode data from base64 to binary - raw_voices = data["data"]["v_str"] + try: + raw_voices = data["data"]["v_str"] + except: + print("The TikTok TTS returned an invalid response. Please try again later, and report this bug.") + raise TikTokTTSException(0, "Invalid response") decoded_voices = base64.b64decode(raw_voices) # write voices to specified filepath diff --git a/video_creation/background.py b/video_creation/background.py index 0405e66..0458ce6 100644 --- a/video_creation/background.py +++ b/video_creation/background.py @@ -13,7 +13,7 @@ from utils import settings from utils.console import print_step, print_substep # Load background videos -with open("utils/backgrounds.json") as json_file: +with open("./utils/backgrounds.json") as json_file: background_options = json.load(json_file) # Remove "__comment" from backgrounds