Repository navigation
Description
Error: empty range for randrange()
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Sorry, something went wrong with this version! Try again, and feel free to report this issue at GitHub or the │
│ Discord community. │
│ Version: 3.1 │
│ Error: empty range for randrange() (180, -12, -192) │
│ Config: {'allow_nsfw': False, 'theme': 'dark', 'times_to_run': 1, 'opacity': 0.9, 'transition': 0.2, 'storymode': │
│ False, 'storymodemethod': 1, 'storymode_max_length': 1000, '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': 'REDACTED', 'python_voice': '1', 'py_voice_num': '2', 'silence_duration': 0.3, │
│ 'no_emojis': False}} │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Traceback (most recent call last):
File "/Users/alexandraschuster/Downloads/RedditVideoMakerBot-master 7/main.py", line 130, in
raise err
File "/Users/alexandraschuster/Downloads/RedditVideoMakerBot-master 7/main.py", line 111, in
run_many(config["settings"]["times_to_run"])
File "/Users/alexandraschuster/Downloads/RedditVideoMakerBot-master 7/main.py", line 64, in run_many
main()
File "/Users/alexandraschuster/Downloads/RedditVideoMakerBot-master 7/main.py", line 55, in main
chop_background_video(bg_config, length, reddit_object)
File "/Users/alexandraschuster/Downloads/RedditVideoMakerBot-master 7/video_creation/background.py", line 96, in chop_background_video
start_time, end_time = get_start_and_end_times(video_length, background.duration)
File "/Users/alexandraschuster/Downloads/RedditVideoMakerBot-master 7/video_creation/background.py", line 41, in get_start_and_end_times
random_time = randrange(180, int(length_of_clip) - int(video_length))
File "/Users/alexandraschuster/anaconda3/lib/python3.10/random.py", line 353, in randrange
raise ValueError("empty range for randrange() (%d, %d, %d)" % (istart, istop, width))
ValueError: empty range for randrange() (180, -12, -192)
Reproduction Steps
I tried to run the bot
Expected behavior
I expected the bot to run and received this error.
Screenshots
No response
System Information
Operating System : Apple
Python version : 3.10.9
App version / Branch : 3.1
Checklist
- I have searched the open issues for duplicates.
- I have shown the entire traceback, if possible.
Additional Context
No response
Activity
[-][Bug]: [/-][+] Error: empty range for randrange() [/+]github-actions commentedon May 26, 2023
This issue is stale because it has been open 7 days with no activity. Remove stale label or comment, or this will be closed in 10 days.
Fix elebumm#1649 randrange bug
propilideno commentedon May 26, 2023
Hey bro, i've had this error before , i fixed it for you.
Merge pull request #1669 from propilideno/develop
Update (#1)
Fix elebumm#1649 randrange bug
Merge pull request elebumm#1669 from propilideno/develop