RedditVideoMakerBot icon indicating copy to clipboard operation
RedditVideoMakerBot copied to clipboard

[Bug]: TypeError: __init__() missing 1 required positional argument: 'message'

Open yeetus1992 opened this issue 3 years ago • 5 comments

Describe the bug

When running python main.py or python3 main.py (I am on M1 mac, tried both, same error), I get the following error message:

(env) PS /Users/jerrysmith/RedditVideoMakerBot> python main.py                   
Please input your server region need to visit:
eg: [England, China, ...]
Europe
Using Europe server backend.

██████╗ ███████╗██████╗ ██████╗ ██╗████████╗    ██╗   ██╗██╗██████╗ ███████╗ ██████╗     ███╗   ███╗ █████╗ ██╗  ██╗███████╗██████╗
██╔══██╗██╔════╝██╔══██╗██╔══██╗██║╚══██╔══╝    ██║   ██║██║██╔══██╗██╔════╝██╔═══██╗    ████╗ ████║██╔══██╗██║ ██╔╝██╔════╝██╔══██╗
██████╔╝█████╗  ██║  ██║██║  ██║██║   ██║       ██║   ██║██║██║  ██║█████╗  ██║   ██║    ██╔████╔██║███████║█████╔╝ █████╗  ██████╔╝
██╔══██╗██╔══╝  ██║  ██║██║  ██║██║   ██║       ╚██╗ ██╔╝██║██║  ██║██╔══╝  ██║   ██║    ██║╚██╔╝██║██╔══██║██╔═██╗ ██╔══╝  ██╔══██╗
██║  ██║███████╗██████╔╝██████╔╝██║   ██║        ╚████╔╝ ██║██████╔╝███████╗╚██████╔╝    ██║ ╚═╝ ██║██║  ██║██║  ██╗███████╗██║  ██║
╚═╝  ╚═╝╚══════╝╚═════╝ ╚═════╝ ╚═╝   ╚═╝         ╚═══╝  ╚═╝╚═════╝ ╚══════╝ ╚═════╝     ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝

                                                                                       
                                                                                       
   Thanks for using this tool! Feel free to contribute to this project on GitHub! If   
  you have any questions, feel free to reach out to me on Twitter 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.0.1) 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 5                                                           │
╰─────────────────────────────────────────────────────────────────────────────────────╯
Logging into Reddit.
╭─────────────────────────────────────────────────────────────────────────────────────╮
│ Getting subreddit threads...                                                        │
╰─────────────────────────────────────────────────────────────────────────────────────╯
Using subreddit: r/AskReddit from TOML config
This post was pinned by moderators. Skipping...
NSFW Post Detected. Skipping...
Video will be: Redditors who still haven't had COVID what is your secret? 👍
Thread url is : 
https://reddit.com/r/AskReddit/comments/118ju4l/redditors_who_still_havent_had_covid_wh
at_is_your/ 👍
Thread has 2471 upvotes
Thread has a upvote ratio of 86.0%
Thread has 5169 comments
Received subreddit threads Successfully.
Thread ID is 118ju4l
╭─────────────────────────────────────────────────────────────────────────────────────╮
│ Sorry, something went wrong with this version! Try again, and feel free to report   │
│ this issue at GitHub or the Discord community.                                      │
│ Version: 3.0.1,Story mode: False, Story mode method: 1,                             │
│ Postid : {'allow_nsfw': False, 'theme': 'dark', 'times_to_run': 5, 'opacity': 0.9,  │
│ 'transition': 0.2, 'storymode': False, 'storymodemethod': 1,                        │
│ 'storymode_max_length': 1000, 'fps': 30, 'resolution_w': 1080, 'resolution_h':      │
│ 1920, 'background': {'background_choice': 'minecraft', 'background_thumbnail':      │
│ False, 'background_thumbnail_font_family': 'arial',                                 │
│ 'background_thumbnail_font_size': 96, 'background_thumbnail_font_color':            │
│ '255,255,255'}, 'tts': {'voice_choice': 'tiktok', 'aws_polly_voice': 'Matthew',     │
│ 'streamlabs_polly_voice': 'Matthew', 'tiktok_voice': 'en_us_001',                   │
│ 'tiktok_sessionid': '', 'python_voice': '1', 'py_voice_num': '2',                   │
│ 'silence_duration': 0.3, 'no_emojis': False}},allownsfw :False,is_nsfw : False      │
╰─────────────────────────────────────────────────────────────────────────────────────╯
Traceback (most recent call last):
  File "/Users/jerrysmith/RedditVideoMakerBot/main.py", line 115, in <module>
    raise err
  File "/Users/jerrysmith/RedditVideoMakerBot/main.py", line 99, in <module>
    run_many(config["settings"]["times_to_run"])
  File "/Users/jerrysmith/RedditVideoMakerBot/main.py", line 63, in run_many
    main()
  File "/Users/jerrysmith/RedditVideoMakerBot/main.py", line 49, in main
    length, number_of_comments = save_text_to_mp3(reddit_object)
  File "/Users/jerrysmith/RedditVideoMakerBot/video_creation/voices.py", line 37, in save_text_to_mp3
    text_to_mp3 = TTSEngine(
  File "/Users/jerrysmith/RedditVideoMakerBot/TTS/engine_wrapper.py", line 45, in __init__
    self.tts_module = tts_module()
  File "/Users/jerrysmith/RedditVideoMakerBot/TTS/TikTok.py", line 83, in __init__
    raise TikTokTTSException(5)
TypeError: __init__() missing 1 required positional argument: 'message'
(env) PS /Users/jerrysmith/RedditVideoMakerBot> 

Reproduction Steps

I ran python main.py

Expected behavior

Getting the video

Screenshots

No response

System Information

Operating System : [M1, Silicon, MacOs, Ventura] Python version : [Python 3.9.13] App version / Branch : [newest version (3.0.1) of the bot]

Checklist

  • [X] I have searched the open issues for duplicates.
  • [X] I have shown the entire traceback, if possible.

Additional Context

I would be beyond grateful for help. Been trying to figure this out for days.

Please explain in easy to follow terms as I am new to coding.

Many thanks for the ongoing support on this GitHub. Closed issues already helped me this past days, ty for enabling me to learn something.

Have a good one

yeetus1992 avatar Feb 22 '23 08:02 yeetus1992

I believe to solve you can either follow the steps here: Configuring the Reddit Video Maker Bot to configure the TikTok TTS or change voice_choice under [settings.tts] in config.toml to any of these: streamlabspolly, tiktok, googletranslate, awspolly, pyttsx.

note: most of the options either return errors (for me at least) as they also seem to require configuring

blakkkk avatar Feb 23 '23 05:02 blakkkk

THANK YOU! that was it. simply configured the tt tts <3

yeetus1992 avatar Feb 23 '23 09:02 yeetus1992

Hello there, I'm having the same issue. What did you mean by configured the tt tts <3. Could you explain in detail ? Thank you. Here is my settings [settings.tts] voice_choice = "tiktok" aws_polly_voice = "Matthew" streamlabs_polly_voice = "Matthew" tiktok_voice = "en_us_001" tiktok_sessionid = "" python_voice = "1" py_voice_num = "2" silence_duration = 0.3 no_emojis = false

NarsuAltan avatar Mar 01 '23 16:03 NarsuAltan

@NarsuAltan see here: https://reddit-video-maker-bot.netlify.app/docs/configuring under 'Obtaining TikTok SessionID'

yeetus1992 avatar Mar 02 '23 10:03 yeetus1992

Thank You

NarsuAltan avatar Mar 03 '23 13:03 NarsuAltan