elebumm / RedditVideoMakerBot

Create Reddit Videos with just✨ one command ✨
GNU General Public License v3.0
6.5k stars 1.83k forks source link

I get an error while the script is saving the Mp3 file #1225

Closed MattiaValerio closed 2 years ago

MattiaValerio commented 2 years ago

Describe the bug

Hi everyone, I downloaded the script and install all the requirements (I'm on a MacBook Pro intel based).

Reproduction Steps

When I start the script using "python3 main.py" I get the following error:

Traceback (most recent call last): File "/Users/mattia/Desktop/RedditVideoMakerBot-2.4.2/main.py", line 83, in run_many(config["settings"]["times_to_run"]) File "/Users/mattia/Desktop/RedditVideoMakerBot-2.4.2/main.py", line 62, in run_many main() File "/Users/mattia/Desktop/RedditVideoMakerBot-2.4.2/main.py", line 48, in main length, number_of_comments = save_text_to_mp3(reddit_object) File "/Users/mattia/Desktop/RedditVideoMakerBot-2.4.2/video_creation/voices.py", line 50, in save_text_to_mp3 return text_to_mp3.run() File "/Users/mattia/Desktop/RedditVideoMakerBot-2.4.2/TTS/engine_wrapper.py", line 61, in run self.call_tts("title", process_text(self.reddit_object["thread_title"])) File "/Users/mattia/Desktop/RedditVideoMakerBot-2.4.2/TTS/engine_wrapper.py", line 117, in call_tts self.tts_module.run(text, filepath=f"{self.path}/{filename}.mp3") File "/Users/mattia/Desktop/RedditVideoMakerBot-2.4.2/TTS/TikTok.py", line 94, in run vstr = [r.json()["data"]["v_str"]][0] KeyError: 'data'

If I run the script using "bash install.sh" I'm able to create the video and use the script correctly but every time I have to reset the settings. I've tried to download the 2.4.2 version but nothing change :(

Is someone having my same issue?

Expected behavior

Screenshots

No response

System Information

Operating System : MacOS Python version : Python 3.10.6 App version: 2.4.1

Checklist

Additional Context

No response

marcohoovy commented 2 years ago

Duplicate, please change the TTS provider to something else other then Tiktok because the Tiktok TTS api has either been locked or moved

hammamikhairi commented 2 years ago

Duplicate of #1198

MattiaValerio commented 2 years ago

Thank you, now it's working. I'm sorry I didn't see #1198