X-T-E-R / Uni-TTS

本项目意图在于让使用各类语音合成引擎的方式变得统一,支持多种语音合成引擎适配器,允许直接作为模组使用或启动后端服务
MIT License
659 stars 58 forks source link

对于 ImportError: cannot import name 'url_quote' from 'werkzeug.urls' 错误的解决方法 #4

Closed Myer921 closed 9 months ago

Myer921 commented 9 months ago
Traceback (most recent call last):  File "/root/GPT-SoVITSGIT/TTS-for-GPT-soVITS/tts_backend.py", line 2, in <module>
    from flask import Flask, request, Response, jsonify  File "/root/miniconda3/envs/GPTSoVits/lib/python3.9/site-packages/flask/__init__.py", line 7, in <module>    from .app import Flask as Flask  File "/root/miniconda3/envs/GPTSoVits/lib/python3.9/site-packages/flask/app.py", line 27, in <module>    from . import cli
  File "/root/miniconda3/envs/GPTSoVits/lib/python3.9/site-packages/flask/cli.py", line 17, in <module>    from .helpers import get_debug_flag
  File "/root/miniconda3/envs/GPTSoVits/lib/python3.9/site-packages/flask/helpers.py", line 14, in <module>
    from werkzeug.urls import url_quote
ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/root/miniconda3/envs/GPTSoVits/lib/python3.9/site-packages/werkzeug/urls.py)

解决方案,指定 werkzeug 的版本 pip install Werkzeug==2.2.2

Myer921 commented 9 months ago

在强制推送的新版本中问题已解决