Repository: elebumm/RedditVideoMakerBot

Issue #1198: [Bug]: Error after Saving text to MP3 files...
Created: 2022-08-22T19:27:26Z
Describe the bug
When running the main.py it stops after saving text to MP3 files...
It gives the following error codes.
Traceback (most recent call last):
File "C:\Users\PC\Documents\RedditVideoMakerBot-2.4.2\main.py", line 83, in 
run_many(config["settings"]["times_to_run"])
File "C:\Users\PC\Documents\RedditVideoMakerBot-2.4.2\main.py", line 62, in run_many
main()
File "C:\Users\PC\Documents\RedditVideoMakerBot-2.4.2\main.py", line 48, in main
length, number_of_comments = save_text_to_mp3(reddit_object)
File "C:\Users\PC\Documents\RedditVideoMakerBot-2.4.2\video_creation\voices.py", line 50, in save_text_to_mp3
return text_to_mp3.run()
File "C:\Users\PC\Documents\RedditVideoMakerBot-2.4.2\TTS\engine_wrapper.py", line 61, in run
self.call_tts("title", process_text(self.reddit_object["thread_title"]))
File "C:\Users\PC\Documents\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 "C:\Users\PC\Documents\RedditVideoMakerBot-2.4.2\TTS\TikTok.py", line 94, in run
vstr = [r.json()["data"]["v_str"]][0]
KeyError: 'data'
Reproduction Steps
Run on windows 11
Python 3.10
Subreddit: AskReddit
config.TOML settings:
[settings]
allow_nsfw = true
theme = "dark"
times_to_run = 1
opacity = 0.9
transition = 0.2
storymode = false
[settings.background]
background_choice = "minecraft"
[settings.tts]
voice_choice = "tiktok"
aws_polly_voice = "Matthew"
streamlabs_polly_voice = "Matthew"
tiktok_voice = "en_us_006"
python_voice = "1"
py_voice_num = "2"
[reddit.creds]
client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
client_secret = "xxxxxxxxxxxxxxxxxx"
username = "xxxxxxxxxxxxxx"
password = "xxxxxxxxxxx"
2fa = false
[reddit.thread]
random = false
subreddit = "AskReddit"
post_id = ""
max_comment_length = 500
post_lang = ""
min_comments = 20
Expected behavior
Running and saving the video?
Screenshots
No response
System Information
Operating System : [e.g. Windows 11]
Python version : [e.g. Python 3.6]
App version / Branch [e.g. latest, V2.0, master, develop]
Checklist

 I have searched the open issues for duplicates.
 I have shown the entire traceback, if possible.

Additional Context
No response

Duplicate issue #1225: I get an error while the script is saving the Mp3 file
Created: 2022-08-30T11:01:46Z
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

 I have searched the open issues for duplicates.
 I have shown the entire traceback, if possible.

Additional Context
No response

Closing comment (2022-08-30T11:15:01Z): Duplicate of #1198