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

使用命令行进行文字语言合成时,报错:“raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file” #2776

Closed
yinghao2016 opened this issue Dec 28, 2022 · 2 comments
Labels

Comments

@yinghao2016
Copy link

具体:
Traceback (most recent call last):
File "D:\ProgramFiles\Python38\lib\runpy.py", line 194, in run_module_as_main
return run_code(code, main_globals, None,
File "D:\ProgramFiles\Python38\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "E:\PycharmProjects\ConvertWebWithAjax\venv\Scripts\paddlespeech.exe_main
.py", line 7, in
File "E:\PycharmProjects\ConvertWebWithAjax\venv\lib\site-packages\paddlespeech\cli\entry.py", line 40, in execute
exec("from {} import {}".format(module, cls))
File "", line 1, in
File "E:\PycharmProjects\ConvertWebWithAjax\venv\lib\site-packages\paddlespeech\cli\tts_init
.py", line 14, in
from .infer import TTSExecutor
File "E:\PycharmProjects\ConvertWebWithAjax\venv\lib\site-packages\paddlespeech\cli\tts\infer.py", line 33, in
from paddlespeech.t2s.exps.syn_utils import get_am_inference
File "E:\PycharmProjects\ConvertWebWithAjax\venv\lib\site-packages\paddlespeech\t2s_init
.py", line 18, in
from . import frontend
File "E:\PycharmProjects\ConvertWebWithAjax\venv\lib\site-packages\paddlespeech\t2s\frontend_init.py", line 16, in
from .phonectic import *
File "E:\PycharmProjects\ConvertWebWithAjax\venv\lib\site-packages\paddlespeech\t2s\frontend\phonectic.py", line 20, in
from g2p_en import G2p
File "E:\PycharmProjects\ConvertWebWithAjax\venv\lib\site-packages\g2p_en_init_.py", line 1, in
from .g2p import G2p
File "E:\PycharmProjects\ConvertWebWithAjax\venv\lib\site-packages\g2p_en\g2p.py", line 26, in
nltk.data.find('corpora/cmudict.zip')
File "E:\PycharmProjects\ConvertWebWithAjax\venv\lib\site-packages\nltk\data.py", line 542, in find
return ZipFilePathPointer(p, zipentry)
File "E:\PycharmProjects\ConvertWebWithAjax\venv\lib\site-packages\nltk\compat.py", line 41, in _decorator
return init_func(*args, **kwargs)
File "E:\PycharmProjects\ConvertWebWithAjax\venv\lib\site-packages\nltk\data.py", line 394, in init
zipfile = OpenOnDemandZipFile(os.path.abspath(zipfile))
File "E:\PycharmProjects\ConvertWebWithAjax\venv\lib\site-packages\nltk\compat.py", line 41, in _decorator
return init_func(*args, **kwargs)
File "E:\PycharmProjects\ConvertWebWithAjax\venv\lib\site-packages\nltk\data.py", line 935, in init
zipfile.ZipFile.init(self, filename)
File "D:\ProgramFiles\Python38\lib\zipfile.py", line 1269, in init
self._RealGetContents()
File "D:\ProgramFiles\Python38\lib\zipfile.py", line 1336, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

下载了nltk也解压到项目根目录,但总是报错,不知道什么原因,求解?

@yt605155624
Copy link
Collaborator

yt605155624 commented Dec 28, 2022

Duplicate of #1925
应该还是没有正常解压到正确的位置, 注意是 ${HOME} 目录

@yinghao2016
Copy link
Author

确实是位置放错了,已经修改过来,多谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants