Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Program spits out NameError #2257

Open
2 tasks done
hellonearth311 opened this issue Feb 26, 2025 · 1 comment
Open
2 tasks done

[Bug]: Program spits out NameError #2257

hellonearth311 opened this issue Feb 26, 2025 · 1 comment
Labels
bug Something isn't working stale

Comments

@hellonearth311
Copy link

hellonearth311 commented Feb 26, 2025

Describe the bug

I'm trying to use the bot and every time, it spits out a name error. I have attached the error report below.

Traceback (most recent call last):
  File "/Users/swaritnarang/Downloads/RedditVideoMakerBot-3.3.0/redditbot-env/lib/python3.10/site-packages/pyttsx3/__init__.py", line 20, in init
    eng = _activeEngines[driverName]
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/weakref.py", line 137, in __getitem__
    o = self.data[key]()
KeyError: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/swaritnarang/Downloads/RedditVideoMakerBot-3.3.0/main.py", line 131, in <module>
    raise err
  File "/Users/swaritnarang/Downloads/RedditVideoMakerBot-3.3.0/main.py", line 113, in <module>
    run_many(config["settings"]["times_to_run"])
  File "/Users/swaritnarang/Downloads/RedditVideoMakerBot-3.3.0/main.py", line 68, in run_many
    main()
  File "/Users/swaritnarang/Downloads/RedditVideoMakerBot-3.3.0/main.py", line 50, in main
    length, number_of_comments = save_text_to_mp3(reddit_object)
  File "/Users/swaritnarang/Downloads/RedditVideoMakerBot-3.3.0/video_creation/voices.py", line 49, in save_text_to_mp3
    return text_to_mp3.run()
  File "/Users/swaritnarang/Downloads/RedditVideoMakerBot-3.3.0/TTS/engine_wrapper.py", line 74, in run
    self.call_tts("title", process_text(self.reddit_object["thread_title"]))
  File "/Users/swaritnarang/Downloads/RedditVideoMakerBot-3.3.0/TTS/engine_wrapper.py", line 147, in call_tts
    self.tts_module.run(
  File "/Users/swaritnarang/Downloads/RedditVideoMakerBot-3.3.0/TTS/pyttsx.py", line 33, in run
    engine = pyttsx3.init()
  File "/Users/swaritnarang/Downloads/RedditVideoMakerBot-3.3.0/redditbot-env/lib/python3.10/site-packages/pyttsx3/__init__.py", line 22, in init
    eng = Engine(driverName, debug)
  File "/Users/swaritnarang/Downloads/RedditVideoMakerBot-3.3.0/redditbot-env/lib/python3.10/site-packages/pyttsx3/engine.py", line 30, in __init__
    self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
  File "/Users/swaritnarang/Downloads/RedditVideoMakerBot-3.3.0/redditbot-env/lib/python3.10/site-packages/pyttsx3/driver.py", line 50, in __init__
    self._module = importlib.import_module(name)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Users/swaritnarang/Downloads/RedditVideoMakerBot-3.3.0/redditbot-env/lib/python3.10/site-packages/pyttsx3/drivers/nsss.py", line 12, in <module>
    class NSSpeechDriver(NSObject):
  File "/Users/swaritnarang/Downloads/RedditVideoMakerBot-3.3.0/redditbot-env/lib/python3.10/site-packages/pyttsx3/drivers/nsss.py", line 13, in NSSpeechDriver
    @objc.python_method
NameError: name 'objc' is not defined. Did you mean: 'object'?

Reproduction Steps

  1. Install all dependencies in a venv.
  2. Run the program.

Expected behavior

I expected it to spit out a video, but instead it gave me an error.

Screenshots

No response

System Information

Operating System : MacOS Sequoia
Python version : Python 3.10
App version / Branch : latest

Checklist

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

Additional Context

Here's my 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': 'AitaClips', '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}} 
@hellonearth311 hellonearth311 added the bug Something isn't working label Feb 26, 2025
Copy link
Contributor

github-actions bot commented Mar 6, 2025

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.

@github-actions github-actions bot added the stale label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

1 participant