myshell-ai / MeloTTS

High-quality multi-lingual text-to-speech library by MyShell.ai. Support English, Spanish, French, Chinese, Japanese and Korean.
MIT License
4.87k stars 636 forks source link

when build docker, AttributeError: module 'botocore.exceptions' has no attribute 'HTTPClientError' #118

Closed Verfinix closed 6 months ago

Verfinix commented 7 months ago

When trying to build docker

docker build -t melotts . on linux having error below, any idea how to resolve this ?

6.055 [nltk_data] Unzipping corpora/cmudict.zip. 24.54 Traceback (most recent call last): 24.54 File "/app/melo/init_downloads.py", line 5, in 24.54 from melo.api import TTS 24.54 File "/app/melo/api.py", line 18, in 24.54 from .download_utils import load_or_download_config, load_or_download_model 24.54 File "/app/melo/download_utils.py", line 4, in 24.54 from cached_path import cached_path 24.54 File "/usr/local/lib/python3.9/site-packages/cached_path/init.py", line 13, in 24.54 from ._cached_path import cached_path 24.54 File "/usr/local/lib/python3.9/site-packages/cached_path/_cached_path.py", line 15, in 24.54 from .schemes import ( 24.54 File "/usr/local/lib/python3.9/site-packages/cached_path/schemes/init.py", line 6, in 24.54 from .s3 import S3Client 24.54 File "/usr/local/lib/python3.9/site-packages/cached_path/schemes/s3.py", line 16, in 24.54 class S3Client(SchemeClient): 24.54 File "/usr/local/lib/python3.9/site-packages/cached_path/schemes/s3.py", line 18, in S3Client 24.54 botocore.exceptions.HTTPClientError, 24.54 AttributeError: module 'botocore.exceptions' has no attribute 'HTTPClientError'

Dockerfile:11

9 | RUN pip install -e . 10 | RUN python -m unidic download 11 | >>> RUN python melo/init_downloads.py 12 |
13 | CMD ["python", "./melo/app.py", "--host", "0.0.0.0", "--port", "8888"]

lirc572 commented 7 months ago

See https://github.com/myshell-ai/MeloTTS/issues/108#issuecomment-2068134660

Try modifying the requirements.txt file to include botocore==1.34.88 cached_path==1.6.2

Verfinix commented 6 months ago

Thanks for the great feedback. This resolved my problem.

Verfinix commented 6 months ago

Thanks a lot

Relucent commented 3 months ago

I also encountered this problem

botocore.exceptions.HTTPClientError,
AttributeError: module 'botocore.exceptions' has no attribute 'HTTPClientError'

botocore==1.34.98 cached_path==1.6.2