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

App not starting #5

Open
natheemy opened this issue Feb 26, 2024 · 3 comments
Open

App not starting #5

natheemy opened this issue Feb 26, 2024 · 3 comments

Comments

@natheemy
Copy link

App not starting

I have followed the mentioned steps and python -m uvicorn app.main:app throwing the below error Please help

(myenv) PS D:\Natheem\rvc\TTS-RVC-API> python -m uvicorn app.main:app 2024-02-26 19:18:37 [info ] STARTUP CONFIG: {'rvc': {'model_dir': 'D:\\Natheem\\rvc\\TTS-RVC-API\\models', 'bark_voice_map': {'default': 'v2/en_speaker_6', 'spearker1': 'v2/en_speaker_9'}}, 'tts': {'output_dir': 'D:\\Natheem\\rvc\\TTS-RVC-API\\tmp'}} Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "D:\Natheem\rvc\TTS-RVC-API\myenv\Lib\site-packages\uvicorn\__main__.py", line 4, in <module> uvicorn.main() File "D:\Natheem\rvc\TTS-RVC-API\myenv\Lib\site-packages\click\core.py", line 1157, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Natheem\rvc\TTS-RVC-API\myenv\Lib\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "D:\Natheem\rvc\TTS-RVC-API\myenv\Lib\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Natheem\rvc\TTS-RVC-API\myenv\Lib\site-packages\click\core.py", line 783, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Natheem\rvc\TTS-RVC-API\myenv\Lib\site-packages\uvicorn\main.py", line 416, in main run( File "D:\Natheem\rvc\TTS-RVC-API\myenv\Lib\site-packages\uvicorn\main.py", line 587, in run server.run() File "D:\Natheem\rvc\TTS-RVC-API\myenv\Lib\site-packages\uvicorn\server.py", line 61, in run return asyncio.run(self.serve(sockets=sockets)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\asyncio\runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "D:\Natheem\rvc\TTS-RVC-API\myenv\Lib\site-packages\uvicorn\server.py", line 68, in serve config.load() File "D:\Natheem\rvc\TTS-RVC-API\myenv\Lib\site-packages\uvicorn\config.py", line 467, in load self.loaded_app = import_from_string(self.app) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Natheem\rvc\TTS-RVC-API\myenv\Lib\site-packages\uvicorn\importer.py", line 21, in import_from_string module = importlib.import_module(module_str) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1206, in _gcd_import File "<frozen importlib._bootstrap>", line 1178, in _find_and_load File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 940, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "D:\Natheem\rvc\TTS-RVC-API\app\main.py", line 7, in <module> from .routers import full, list_speakers File "D:\Natheem\rvc\TTS-RVC-API\app\routers\full.py", line 3, in <module> from app.routers.tts import server File "D:\Natheem\rvc\TTS-RVC-API\app\routers\tts.py", line 12, in <module> from ..rvc.misc import ( File "D:\Natheem\rvc\TTS-RVC-API\app\rvc\misc.py", line 9, in <module> from fairseq import checkpoint_utils File "D:\Natheem\rvc\TTS-RVC-API\myenv\Lib\site-packages\fairseq\__init__.py", line 20, in <module> from fairseq.distributed import utils as distributed_utils File "D:\Natheem\rvc\TTS-RVC-API\myenv\Lib\site-packages\fairseq\distributed\__init__.py", line 7, in <module> from .fully_sharded_data_parallel import ( File "D:\Natheem\rvc\TTS-RVC-API\myenv\Lib\site-packages\fairseq\distributed\fully_sharded_data_parallel.py", line 10, in <module> from fairseq.dataclass.configs import DistributedTrainingConfig File "D:\Natheem\rvc\TTS-RVC-API\myenv\Lib\site-packages\fairseq\dataclass\__init__.py", line 6, in <module> from .configs import FairseqDataclass File "D:\Natheem\rvc\TTS-RVC-API\myenv\Lib\site-packages\fairseq\dataclass\configs.py", line 1104, in <module> @dataclass ^^^^^^^^^ File "C:\Program Files\Python311\Lib\dataclasses.py", line 1223, in dataclass return wrap(cls) ^^^^^^^^^ File "C:\Program Files\Python311\Lib\dataclasses.py", line 1213, in wrap return _process_class(cls, init, repr, eq, order, unsafe_hash, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\dataclasses.py", line 958, in _process_class cls_fields.append(_get_field(cls, name, type, kw_only)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python311\Lib\dataclasses.py", line 815, in _get_field raise ValueError(f'mutable default {type(f.default)} for field ' ValueError: mutable default <class 'fairseq.dataclass.configs.CommonConfig'> for field common is not allowed: use default_factory

Thanks in advance

@skshadan
Copy link
Owner

skshadan commented Mar 1, 2024 via email

@skshadan
Copy link
Owner

skshadan commented Mar 4, 2024

Check Fairseq Version Compatibility: Ensure that the version of the Fairseq library you're using is compatible with Python 3.11. It's possible that the version of Fairseq you have does not fully support Python 3.11, in which mutable defaults are handled differently or more strictly. You might need to downgrade to an earlier version of Python (such as Python 3.8 or 3.9) where this pattern of mutable defaults is still tolerated or to update the Fairseq library to a version that fixes this compatibility issue if such a version exists.

@DeepanshCUHK
Copy link

I had similar error. Cloning it from hugging space (https://huggingface.co/salmaniq/Text-to-speech-voice_cloning) worked for me. I think Github code is not updated?

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

3 participants