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

No module named 'openvoice' attempting to start server #302

Open
fury88 opened this issue Aug 31, 2024 · 8 comments
Open

No module named 'openvoice' attempting to start server #302

fury88 opened this issue Aug 31, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@fury88
Copy link

fury88 commented Aug 31, 2024

I must have missed a step, but I followed the instructions here and once I started up the server, I got this. Obviously, a script or package reference is in the wrong place. Whether it's me or the setup of the server itself I'm not sure.

`ubu@machine~/Projects/OpenVoice_server/openvoice$ uvicorn openvoice_server:app --host 0.0.0.0 --port 8000

Traceback (most recent call last):
File "/home/ubu/.local/bin/uvicorn", line 8, in
sys.exit(main())
File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/ubu/.local/lib/python3.10/site-packages/uvicorn/main.py", line 410, in main
run(
File "/home/ubu/.local/lib/python3.10/site-packages/uvicorn/main.py", line 577, in run
server.run()
File "/home/ubu/.local/lib/python3.10/site-packages/uvicorn/server.py", line 65, in run
return asyncio.run(self.serve(sockets=sockets))
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/home/ubu/.local/lib/python3.10/site-packages/uvicorn/server.py", line 69, in serve
await self._serve(sockets)
File "/home/ubu/.local/lib/python3.10/site-packages/uvicorn/server.py", line 76, in _serve
config.load()
File "/home/ubu/.local/lib/python3.10/site-packages/uvicorn/config.py", line 434, in load
self.loaded_app = import_from_string(self.app)
File "/home/ubu/.local/lib/python3.10/site-packages/uvicorn/importer.py", line 22, in import_from_string
raise exc from None
File "/home/ubu/.local/lib/python3.10/site-packages/uvicorn/importer.py", line 19, in import_from_string
module = importlib.import_module(module_str)
File "/usr/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 "/home/ubu/Projects/OpenVoice_server/openvoice/openvoice_server.py", line 15, in
from api import ToneColorConverter
File "/home/ubu/Projects/OpenVoice_server/openvoice/api.py", line 5, in
from openvoice import utils
ModuleNotFoundError: No module named 'openvoice'
`

Copy link

dosubot bot commented Aug 31, 2024

Hello @fury88 👋, I'm here to assist you with any bugs, questions, or contributions you have. Let's tackle this issue together!

I found a similar open issue: ModuleNotFoundError: No module named 'openvoice'. The suggested solution is to reset the repository to a specific commit:

git reset --hard 2c8a8e269a8f88c9970a254df70050cacfee0d3f

Additionally, the error "No module named 'openvoice'" typically occurs because the Python interpreter cannot find the openvoice module. To resolve this, you need to install the openvoice module. You can do this using pip:

pip install openvoice

If openvoice is a local module and not available on PyPI, ensure that the module is in your Python path or the same directory as your script. You can also add the module to your Python path programmatically:

import sys
sys.path.append('/path/to/openvoice')

Replace '/path/to/openvoice' with the actual path to the openvoice module [1].

For detailed installation instructions, refer to the docs/USAGE.md file in the repository:

conda create -n openvoice python=3.9
conda activate openvoice
git clone [email protected]:myshell-ai/OpenVoice.git
cd OpenVoice
pip install -e .

This should help you set up the environment correctly [2].

To continue talking to Dosu, mention @dosu.

@fury88
Copy link
Author

fury88 commented Aug 31, 2024

@dosu Why must I use conda? I'd prefer not to.

@dosubot dosubot bot added the bug Something isn't working label Aug 31, 2024
Copy link

dosubot bot commented Aug 31, 2024

You must use conda for setting up the OpenVoice environment because the official installation instructions specify using conda to create and manage the Python environment. This ensures that all dependencies are correctly installed and managed, which is crucial for the proper functioning of OpenVoice.

However, there are alternative setup instructions that do not involve using conda. The docs/USAGE.md provides unofficial installation guides for Windows and Docker contributed by the community:

To continue talking to Dosu, mention @dosu.

@fury88
Copy link
Author

fury88 commented Aug 31, 2024

@dosu I'll run with the official on linux here. Was trying not to install a ton of unneeded stuff but this is fine :-)

Copy link

dosubot bot commented Aug 31, 2024

Great! If you encounter any further issues or need additional assistance while setting up the environment, feel free to reach out. Happy coding!

To continue talking to Dosu, mention @dosu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
@fury88 and others