How to solve this error -> ModuleNotFoundError: No module named 'Foundation' #4749
donggook-me
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, If you stuck by this NotFoundError, Follow me. Do not give up :)
File "/Users/dongguk/coding/Auto-GPT/autogpt/speech/eleven_labs.py", line 82, in _speech
playsound("speech.mpeg", True)
File "/Users/dongguk/coding/Auto-GPT/myenv/lib/python3.11/site-packages/playsound.py", line 55, in _playsoundOSX
from AppKit import NSSound
File "/Users/dongguk/coding/Auto-GPT/myenv/lib/python3.11/site-packages/AppKit/init.py", line 10, in
import Foundation
ModuleNotFoundError: No module named 'Foundation'
I am using M1 MAC OS(ver 13 Ventura), autogpt works well normally, but when I run this with --speak configure(especially Elevenlabs api)(MACOS default TTS works well without anything). This error happens.
But when we enter the problematic part -> Auto-GPT/myenv/lib/python3.11/site-packages/AppKit/init.py"
Manually written wrappers:
import Foundation
import objc
from AppKit import _metadata
from AppKit._inlines import inline_list
In this code, it cannot import Foundation, Because the Foundation module folder is defined as "foundation", So, just rename the directory foundation -> Foundation. And the voice comes out well.
Thanks for everyone who make it.
Beta Was this translation helpful? Give feedback.
All reactions