RedditVideoMakerBot
RedditVideoMakerBot copied to clipboard
[Bug]: Translating text error
Describe the bug
My error is:
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Sorry, something went wrong with this version! Try again, and feel free to report this issue at GitHub or the │
│ Discord community. │
│ Version: 3.3.0 │
│ Error: Code: 1, reason: probably the aid value isn't correct, message: Couldn’t load speech. Try again. │
│ Config: {'allow_nsfw': False, 'theme': 'dark', 'times_to_run': 1, 'opacity': 0.9, 'storymode': False, │
│ 'storymodemethod': 1, 'storymode_max_length': 1000, 'resolution_w': 1080, 'resolution_h': 1920, 'zoom': 1.0, │
│ 'channel_name': 'Pandademon', 'background': {'background_video': 'minecraft', 'background_audio': 'lofi', │
│ 'background_audio_volume': 0.15, 'enable_extra_audio': False, 'background_thumbnail': False, │
│ 'background_thumbnail_font_family': 'arial', 'background_thumbnail_font_size': 96, │
│ 'background_thumbnail_font_color': '255,255,255'}, 'tts': {'voice_choice': 'tiktok', 'random_voice': True, │
│ 'elevenlabs_voice_name': 'Bella', 'elevenlabs_api_key': 'REDACTED', 'aws_polly_voice': 'Matthew', │
│ 'streamlabs_polly_voice': 'Matthew', 'tiktok_voice': 'en_us_001', 'tiktok_sessionid': 'REDACTED', 'python_voice': │
│ '1', 'py_voice_num': '2', 'silence_duration': 0.3, 'no_emojis': False}} │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Traceback (most recent call last):
File "C:\Users\xKotelek\Desktop\RedditVideoMakerBot\main.py", line 131, in <module>
raise err
File "C:\Users\xKotelek\Desktop\RedditVideoMakerBot\main.py", line 113, in <module>
run_many(config["settings"]["times_to_run"])
File "C:\Users\xKotelek\Desktop\RedditVideoMakerBot\main.py", line 68, in run_many
main()
File "C:\Users\xKotelek\Desktop\RedditVideoMakerBot\main.py", line 50, in main
length, number_of_comments = save_text_to_mp3(reddit_object)
File "C:\Users\xKotelek\Desktop\RedditVideoMakerBot\video_creation\voices.py", line 49, in save_text_to_mp3
return text_to_mp3.run()
File "C:\Users\xKotelek\Desktop\RedditVideoMakerBot\TTS\engine_wrapper.py", line 74, in run
self.call_tts("title", process_text(self.reddit_object["thread_title"]))
File "C:\Users\xKotelek\Desktop\RedditVideoMakerBot\TTS\engine_wrapper.py", line 147, in call_tts
self.tts_module.run(
File "C:\Users\xKotelek\Desktop\RedditVideoMakerBot\TTS\TikTok.py", line 109, in run
raise TikTokTTSException(status_code, data["message"])
TTS.TikTok.TikTokTTSException: Code: 1, reason: probably the aid value isn't correct, message: Couldn’t load speech. Try again.```
With my config being: ```
[ai]
ai_similarity_enabled = false
ai_similarity_keywords = ""
[settings]
allow_nsfw = false
theme = "dark"
times_to_run = 1
opacity = 0.9
storymode = false
storymodemethod = 1
storymode_max_length = 1000
resolution_w = 1080
resolution_h = 1920
zoom = 1.0
channel_name = "set"
[settings.background]
background_video = "minecraft"
background_audio = "lofi"
background_audio_volume = 0.15
enable_extra_audio = false
background_thumbnail = false
background_thumbnail_font_family = "arial"
background_thumbnail_font_size = 96
background_thumbnail_font_color = "255,255,255"
[settings.tts]
voice_choice = "tiktok"
random_voice = true
elevenlabs_voice_name = "Bella"
elevenlabs_api_key = "set"
aws_polly_voice = "Matthew"
streamlabs_polly_voice = "Matthew"
tiktok_voice = "en_us_001"
tiktok_sessionid = "set"
python_voice = "1"
py_voice_num = "2"
silence_duration = 0.3
no_emojis = false
[reddit.creds]
client_id = "set"
client_secret = "set"
username = "set"
password = "set"
2fa = false
[reddit.thread]
random = false
subreddit = "CNfans"
post_id = ""
max_comment_length = 500
min_comment_length = 1
post_lang = "en"
min_comments = 20
I've read that there is someting with translation aid or sth but idk how to fix/find it and the people on other issues also. Please Help
Reproduction Steps
- Use my config file + python 3.10
- Install depencies
- Run the file
python3.10 main.py
Expected behavior
To generate me a video with translation build-in
Screenshots
System Information
Operating System : Windows 11 Home 24H2 (Dev) Python version : Python 3.10.11 App version / Branch : latest, cloned today
Checklist
- [x] I have searched the open issues for duplicates.
- [x] I have shown the entire traceback, if possible.
Additional Context
No response
When i changed to google translate i get this error:
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Downloading screenshots of reddit posts... │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Launching Headless Browser...
Logging in to Reddit...
Translating post...
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Sorry, something went wrong with this version! Try again, and feel free to report this issue at GitHub or the │
│ Discord community. │
│ Version: 3.3.0 │
│ Error: Page.evaluate: TypeError: Cannot set properties of null (setting 'textContent') │
│ at eval (eval at evaluate (:226:30), <anonymous>:1:101) │
│ at UtilityScript.evaluate (<anonymous>:233:19) │
│ at UtilityScript.<anonymous> (<anonymous>:1:44) │
│ Config: {'allow_nsfw': False, 'theme': 'dark', 'times_to_run': 1, 'opacity': 0.9, 'storymode': False, │
│ 'storymodemethod': 1, 'storymode_max_length': 1000, 'resolution_w': 1080, 'resolution_h': 1920, 'zoom': 1.0, │
│ 'channel_name': 'Pandademon', 'background': {'background_video': 'minecraft', 'background_audio': 'lofi', │
│ 'background_audio_volume': 0.15, 'enable_extra_audio': False, 'background_thumbnail': False, │
│ 'background_thumbnail_font_family': 'arial', 'background_thumbnail_font_size': 96, │
│ 'background_thumbnail_font_color': '255,255,255'}, 'tts': {'voice_choice': 'pyttsx', 'random_voice': True, │
│ 'elevenlabs_voice_name': 'Bella', 'elevenlabs_api_key': 'REDACTED', 'aws_polly_voice': 'Matthew', │
│ 'streamlabs_polly_voice': 'Matthew', 'tiktok_voice': 'en_us_001', 'tiktok_sessionid': 'REDACTED', 'python_voice': │
│ '1', 'py_voice_num': '2', 'silence_duration': 0.3, 'no_emojis': False}} │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Traceback (most recent call last):
File "C:\Users\xKotelek\Desktop\RedditVideoMakerBot\main.py", line 131, in <module>
raise err
File "C:\Users\xKotelek\Desktop\RedditVideoMakerBot\main.py", line 113, in <module>
run_many(config["settings"]["times_to_run"])
File "C:\Users\xKotelek\Desktop\RedditVideoMakerBot\main.py", line 68, in run_many
main()
File "C:\Users\xKotelek\Desktop\RedditVideoMakerBot\main.py", line 52, in main
get_screenshots_of_reddit_posts(reddit_object, number_of_comments)
File "C:\Users\xKotelek\Desktop\RedditVideoMakerBot\video_creation\screenshot_downloader.py", line 165, in get_screenshots_of_reddit_posts
page.evaluate(
File "C:\Users\xKotelek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright\sync_api\_generated.py", line 8183, in evaluate
self._sync(
File "C:\Users\xKotelek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright\_impl\_sync_base.py", line 115, in _sync
return task.result()
File "C:\Users\xKotelek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright\_impl\_page.py", line 435, in evaluate
return await self._main_frame.evaluate(expression, arg)
File "C:\Users\xKotelek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright\_impl\_frame.py", line 278, in evaluate
await self._channel.send(
File "C:\Users\xKotelek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright\_impl\_connection.py", line 59, in send
return await self._connection.wrap_api_call(
File "C:\Users\xKotelek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright\_impl\_connection.py", line 514, in wrap_api_call
raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None
playwright._impl._errors.Error: Page.evaluate: TypeError: Cannot set properties of null (setting 'textContent')
at eval (eval at evaluate (:226:30), <anonymous>:1:101)
at UtilityScript.evaluate (<anonymous>:233:19)
at UtilityScript.<anonymous> (<anonymous>:1:44)```
set voice_choice to streamlabspolly
██████╗ ███████╗██████╗ ██████╗ ██╗████████╗ ██╗ ██╗██╗██████╗ ███████╗ ██████╗ ███╗ ███╗ █████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔════╝██╔══██╗██╔══██╗██║╚══██╔══╝ ██║ ██║██║██╔══██╗██╔════╝██╔═══██╗ ████╗ ████║██╔══██╗██║ ██╔╝██╔════╝██╔══██╗
██████╔╝█████╗ ██║ ██║██║ ██║██║ ██║ ██║ ██║██║██║ ██║█████╗ ██║ ██║ ██╔████╔██║███████║█████╔╝ █████╗ ██████╔╝
██╔══██╗██╔══╝ ██║ ██║██║ ██║██║ ██║ ╚██╗ ██╔╝██║██║ ██║██╔══╝ ██║ ██║ ██║╚██╔╝██║██╔══██║██╔═██╗ ██╔══╝ ██╔══██╗
██║ ██║███████╗██████╔╝██████╔╝██║ ██║ ╚████╔╝ ██║██████╔╝███████╗╚██████╔╝ ██║ ╚═╝ ██║██║ ██║██║ ██╗███████╗██║ ██║
╚═╝ ╚═╝╚══════╝╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═══╝ ╚═╝╚═════╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
Thanks for using this tool! Feel free to contribute to this project on GitHub! If you have any questions, feel free
to join my Discord server or submit a GitHub issue. You can find solutions to many common problems in the
documentation: https://reddit-video-maker-bot.netlify.app/
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ You are using the newest version (3.3.0) of the bot │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
###############################
# #
# Checking TOML configuration #
# #
###############################
If you see any prompts, that means that you have unset/incorrectly set variables, please input the correct values.
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ on the 1st iteration of 1 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Logging into Reddit.
Version 7.7.1 of praw is outdated. Version 7.8.1 was released Friday October 25, 2024.
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Getting subreddit threads... │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Using subreddit: r/CNfans from TOML config
This post was pinned by moderators. Skipping...
This post was pinned by moderators. Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
all submissions have been done going by top submission order
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
This post has under the specified minimum of comments (20). Skipping...
all submissions have been done going by top submission order
Video will be: chat what the fuck 👍
Thread url is: https://new.reddit.com//r/CNfans/comments/1ky6bug/chat_what_the_fuck/ 👍
Thread has 125 upvotes
Thread has a upvote ratio of 98.0%
Thread has 32 comments
Received subreddit threads Successfully.
Thread ID is 1ky6bug
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Saving Text to MP3 files... │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Translating Text...
Saving... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Translating Text...
Saving... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Translating Text...
Saving... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Translating Text...
Saving... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.7 it/s Translating Text...
Saving... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.7 it/s Translating Text...
Saving... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.7 it/s Translating Text...
Saving... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.7 it/s Translating Text...
Saving... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.7 it/s Translating Text...
Saving... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.8 it/s Translating Text...
Saving... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.8 it/s Translating Text...
Saving... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.8 it/s Translating Text...
Saving... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.8 it/s
Saved Text to MP3 files successfully.
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Downloading screenshots of reddit posts... │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Launching Headless Browser...
Logging in to Reddit...
Translating post...
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Sorry, something went wrong with this version! Try again, and feel free to report this issue at GitHub or the │
│ Discord community. │
│ Version: 3.3.0 │
│ Error: Page.evaluate: TypeError: Cannot set properties of null (setting 'textContent') │
│ at eval (eval at evaluate (:226:30), <anonymous>:1:101) │
│ at UtilityScript.evaluate (<anonymous>:233:19) │
│ at UtilityScript.<anonymous> (<anonymous>:1:44) │
│ Config: {'allow_nsfw': False, 'theme': 'dark', 'times_to_run': 1, 'opacity': 0.9, 'storymode': False, │
│ 'storymodemethod': 1, 'storymode_max_length': 1000, 'resolution_w': 1080, 'resolution_h': 1920, 'zoom': 1.0, │
│ 'channel_name': 'Pandademon', 'background': {'background_video': 'minecraft', 'background_audio': 'lofi', │
│ 'background_audio_volume': 0.15, 'enable_extra_audio': False, 'background_thumbnail': False, │
│ 'background_thumbnail_font_family': 'arial', 'background_thumbnail_font_size': 96, │
│ 'background_thumbnail_font_color': '255,255,255'}, 'tts': {'voice_choice': 'streamlabspolly', 'random_voice': True, │
│ 'elevenlabs_voice_name': 'Bella', 'elevenlabs_api_key': 'REDACTED', 'aws_polly_voice': 'Matthew', │
│ 'streamlabs_polly_voice': 'Matthew', 'tiktok_voice': 'en_us_001', 'tiktok_sessionid': 'REDACTED', 'python_voice': │
│ '1', 'py_voice_num': '2', 'silence_duration': 0.3, 'no_emojis': False}} │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Traceback (most recent call last):
File "C:\Users\xKotelek\Desktop\RedditVideoMakerBot\main.py", line 131, in <module>
raise err
File "C:\Users\xKotelek\Desktop\RedditVideoMakerBot\main.py", line 113, in <module>
run_many(config["settings"]["times_to_run"])
File "C:\Users\xKotelek\Desktop\RedditVideoMakerBot\main.py", line 68, in run_many
main()
File "C:\Users\xKotelek\Desktop\RedditVideoMakerBot\main.py", line 52, in main
get_screenshots_of_reddit_posts(reddit_object, number_of_comments)
File "C:\Users\xKotelek\Desktop\RedditVideoMakerBot\video_creation\screenshot_downloader.py", line 165, in get_screenshots_of_reddit_posts
page.evaluate(
File "C:\Users\xKotelek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright\sync_api\_generated.py", line 8183, in evaluate
self._sync(
File "C:\Users\xKotelek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright\_impl\_sync_base.py", line 115, in _sync
return task.result()
File "C:\Users\xKotelek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright\_impl\_page.py", line 435, in evaluate
return await self._main_frame.evaluate(expression, arg)
File "C:\Users\xKotelek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright\_impl\_frame.py", line 278, in evaluate
await self._channel.send(
File "C:\Users\xKotelek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright\_impl\_connection.py", line 59, in send
return await self._connection.wrap_api_call(
File "C:\Users\xKotelek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright\_impl\_connection.py", line 514, in wrap_api_call
raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None
playwright._impl._errors.Error: Page.evaluate: TypeError: Cannot set properties of null (setting 'textContent')
at eval (eval at evaluate (:226:30), <anonymous>:1:101)
at UtilityScript.evaluate (<anonymous>:233:19)
at UtilityScript.<anonymous> (<anonymous>:1:44)
Closing in favor of #2332