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

可以运行demo_toolbox.py,运行web.py报错 #937

Open
loveannieer opened this issue Jul 23, 2023 · 9 comments
Open

可以运行demo_toolbox.py,运行web.py报错 #937

loveannieer opened this issue Jul 23, 2023 · 9 comments

Comments

@loveannieer
Copy link

loveannieer commented Jul 23, 2023

Summary[问题简述(一句话)]
A clear and concise description of what the issue is.
cmd运行demo_toolbox.py正常使用,cmd运行web.py报错:

PydanticImportError: pydantic:parse_raw_as has been removed in V2.

python用的3.10.11版本,其他都是按照安装指导装的,有更新的自己更新了。

Screenshots[截图(如有)]
44d962a4ced210eed3343038589d9ae

@kaleidosgu
Copy link

kaleidosgu commented Jul 27, 2023

我也遇见相同的问题
找到了解决方案
修改\MockingBird\control\mkgui\base\core.py 这个文件

# from pydantic import BaseModel, parse_raw_as
from pydantic.v1 import BaseModel, parse_raw_as

把parse_raw_as的引用从pydantic 更改为v1,因为v2已经把parse_raw_as移走了。

@marchawake
Copy link

把 pydantic 版本降下来 pip install "pydantic < 2.0.0"

@loveannieer
Copy link
Author

我也遇见相同的问题 找到了解决方案 修改\MockingBird\control\mkgui\base\core.py 这个文件

# from pydantic import BaseModel, parse_raw_as
from pydantic.v1 import BaseModel, parse_raw_as

把parse_raw_as的引用从pydantic 更改为v1,因为v2已经把parse_raw_as移走了。

多谢,先试了这个方法,webui可以打开了,但是因为实际pydantic 版本不对,web版打开以后一堆报错,实际不能用。

@loveannieer
Copy link
Author

把 pydantic 版本降下来 pip install "pydantic < 2.0.0"

感谢,这个可以,完美解决,1楼的兄弟也可以参考这个。

@kaleidosgu
Copy link

把 pydantic 版本降下来 pip install "pydantic < 2.0.0"

感谢,这个可以,完美解决,1楼的兄弟也可以参考这个。

好的多谢

@hanc44
Copy link

hanc44 commented Oct 6, 2023

把 pydantic 版本降下来 pip install "pydantic < 2.0.0"

感谢,这个成功解决

@JackWei01
Copy link

把 pydantic 版本降下来 pip install "pydantic < 2.0.0"

亲测 确实可以!!!

@weirui0430
Copy link

你好,demo_toolbox.py我运行不起来,报错这个:Arguments:
datasets_root: None
vc_mode: False
enc_models_dir: data\ckpt\encoder
syn_models_dir: data\ckpt\synthesizer
voc_models_dir: data\ckpt\vocoder
extractor_models_dir: data\ckpt\ppg_extractor
convertor_models_dir: data\ckpt\ppg2mel
cpu: False
seed: None
no_mp3_support: False

Error in sys.excepthook:

Original exception was: 请问你有遇到过吗

@anze1998
Copy link

anze1998 commented Apr 9, 2024

把pydantic版本降下来pip install "pydantic < 2.0.0"

大哥,我是小白,能交下怎么降吗?修改哪行提示符

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

7 participants