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

Startup issue #13

Closed
y2jcodebreaker opened this issue Mar 14, 2025 · 2 comments
Closed

Startup issue #13

y2jcodebreaker opened this issue Mar 14, 2025 · 2 comments

Comments

@y2jcodebreaker
Copy link

I installed all the requirements using 'pip install -r requirements_cpu.txt', using python3.10. Then i typed in this 'uvicorn app.main:app --host 0.0.0.0 --port 8000'. This is the output:

uvicorn app.main:app --host 0.0.0.0 --port 8000
objc[27634]: Class AVFFrameReceiver is implemented in both /Users/lichking/Documents/voiceChatAI/voiceChat/lib/python3.10/site-packages/av/.dylibs/libavdevice.60.3.100.dylib (0x113268760) and /opt/homebrew/Cellar/ffmpeg@4/4.4.5_4/lib/libavdevice.58.13.100.dylib (0x1646d0308). One of the two will be used. Which one is undefined.
objc[27634]: Class AVFAudioReceiver is implemented in both /Users/lichking/Documents/voiceChatAI/voiceChat/lib/python3.10/site-packages/av/.dylibs/libavdevice.60.3.100.dylib (0x1132687b0) and /opt/homebrew/Cellar/ffmpeg@4/4.4.5_4/lib/libavdevice.58.13.100.dylib (0x1646d0358). One of the two will be used. Which one is undefined.
Traceback (most recent call last):
File "/Users/lichking/Documents/voiceChatAI/voiceChat/bin/uvicorn", line 8, in
sys.exit(main())
File "/Users/lichking/Documents/voiceChatAI/voiceChat/lib/python3.10/site-packages/click/core.py", line 1161, in call
return self.main(*args, **kwargs)
File "/Users/lichking/Documents/voiceChatAI/voiceChat/lib/python3.10/site-packages/click/core.py", line 1082, in main
rv = self.invoke(ctx)
File "/Users/lichking/Documents/voiceChatAI/voiceChat/lib/python3.10/site-packages/click/core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/lichking/Documents/voiceChatAI/voiceChat/lib/python3.10/site-packages/click/core.py", line 788, in invoke
return __callback(*args, **kwargs)
File "/Users/lichking/Documents/voiceChatAI/voiceChat/lib/python3.10/site-packages/uvicorn/main.py", line 410, in main
run(
File "/Users/lichking/Documents/voiceChatAI/voiceChat/lib/python3.10/site-packages/uvicorn/main.py", line 577, in run
server.run()
File "/Users/lichking/Documents/voiceChatAI/voiceChat/lib/python3.10/site-packages/uvicorn/server.py", line 65, in run
return asyncio.run(self.serve(sockets=sockets))
File "/opt/homebrew/Cellar/python@3.10/3.10.16/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete
File "/Users/lichking/Documents/voiceChatAI/voiceChat/lib/python3.10/site-packages/uvicorn/server.py", line 69, in serve
await self._serve(sockets)
File "/Users/lichking/Documents/voiceChatAI/voiceChat/lib/python3.10/site-packages/uvicorn/server.py", line 76, in _serve
config.load()
File "/Users/lichking/Documents/voiceChatAI/voiceChat/lib/python3.10/site-packages/uvicorn/config.py", line 434, in load
self.loaded_app = import_from_string(self.app)
File "/Users/lichking/Documents/voiceChatAI/voiceChat/lib/python3.10/site-packages/uvicorn/importer.py", line 19, in import_from_string
module = importlib.import_module(module_str)
File "/opt/homebrew/Cellar/python@3.10/3.10.16/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 "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/Users/lichking/Documents/voiceChatAI/voice-chat-ai/app/main.py", line 13, in
from .app_logic import start_conversation, stop_conversation, set_env_variable
File "/Users/lichking/Documents/voiceChatAI/voice-chat-ai/app/app_logic.py", line 6, in
from .app import (
File "/Users/lichking/Documents/voiceChatAI/voice-chat-ai/app/app.py", line 59, in
character_display_name = CHARACTER_NAME.capitalize()
AttributeError: 'NoneType' object has no attribute 'capitalize'

I am using macbook m1 pro

@bigsk1
Copy link
Owner

bigsk1 commented Mar 15, 2025

Did you sent your .env ? https://github.com/bigsk1/voice-chat-ai/blob/main/.env.sample

This error indicates that CHARACTER_NAME is None when you try to call .capitalize(), meaning that the environment variable isn't being set or loaded properly

change .env.example to .env and make sure character name is corect based on what's in characters folder or examples and make sure it is lowercase.

I have never tested this on mac, only linux and windows but this seems like it could be the issue.

@bigsk1
Copy link
Owner

bigsk1 commented Mar 15, 2025

I just set a default name in the app.py as a fall back. So even if you don't set a name in lowercase in the .env it shouldn't error.

@bigsk1 bigsk1 closed this as completed Mar 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants