Repository: PaddlePaddle/PaddleSpeech

Issue #1925: ❣️ [nltk_data] zipfile.BadZipFile: File is not a zip file
Created: 2022-05-20T04:09:11Z
运行的时候报错
Traceback (most recent call last):
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/user/Database/temp_workspace/PaddleSpeech/paddlespeech/cli/init.py", line 23, in 
from .tts import TTSExecutor
File "/home/user/Database/temp_workspace/PaddleSpeech/paddlespeech/cli/tts/init.py", line 14, in 
from .infer import TTSExecutor
File "/home/user/Database/temp_workspace/PaddleSpeech/paddlespeech/cli/tts/infer.py", line 36, in 
from paddlespeech.t2s.frontend import English
File "/home/user/Database/temp_workspace/PaddleSpeech/paddlespeech/t2s/init.py", line 18, in 
from . import frontend
File "/home/user/Database/temp_workspace/PaddleSpeech/paddlespeech/t2s/frontend/init.py", line 16, in 
from .phonectic import *
File "/home/user/Database/temp_workspace/PaddleSpeech/paddlespeech/t2s/frontend/phonectic.py", line 20, in 
from g2p_en import G2p
File "/home/caopu/anaconda3/envs/pad/lib/python3.7/site-packages/g2p_en/init.py", line 1, in 
from .g2p import G2p
File "/home/caopu/anaconda3/envs/pad/lib/python3.7/site-packages/g2p_en/g2p.py", line 26, in 
nltk.data.find('corpora/cmudict.zip')
File "/home/caopu/anaconda3/envs/pad/lib/python3.7/site-packages/nltk/data.py", line 542, in find
return ZipFilePathPointer(p, zipentry)
File "/home/caopu/anaconda3/envs/pad/lib/python3.7/site-packages/nltk/compat.py", line 41, in _decorator
return init_func(*args, **kwargs)
File "/home/caopu/anaconda3/envs/pad/lib/python3.7/site-packages/nltk/data.py", line 394, in init
zipfile = OpenOnDemandZipFile(os.path.abspath(zipfile))
File "/home/caopu/anaconda3/envs/pad/lib/python3.7/site-packages/nltk/compat.py", line 41, in _decorator
return init_func(*args, **kwargs)
File "/home/caopu/anaconda3/envs/pad/lib/python3.7/site-packages/nltk/data.py", line 935, in init
zipfile.ZipFile.init(self, filename)
File "/home/caopu/anaconda3/envs/pad/lib/python3.7/zipfile.py", line 1258, in init
self._RealGetContents()
File "/home/caopu/anaconda3/envs/pad/lib/python3.7/zipfile.py", line 1325, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
请问是那个包有冲突么，下边是我的环境：
aiohttp            3.8.1
aiosignal          1.2.0
anyio              3.6.1
appdirs            1.4.4
asgiref            3.5.2
astor              0.8.1
async-timeout      4.0.2
asynctest          0.13.0
attrs              21.4.0
audioread          2.1.9
Babel              2.10.1
bce-python-sdk     0.8.64
Bottleneck         1.3.4
cached-property    1.5.2
certifi            2022.5.18.1
cffi               1.15.0
cfgv               3.3.1
charset-normalizer 2.0.12
click              8.1.3
colorama           0.4.4
colorlog           6.6.0
cycler             0.11.0
Cython             0.29.30
datasets           2.2.1
decorator          5.1.1
dill               0.3.5
Distance           0.1.3
distlib            0.3.4
dtaidistance       2.3.1
editdistance       0.6.0
fastapi            0.78.0
filelock           3.7.0
flake8             4.0.1
Flask              2.1.2
Flask-Babel        2.0.0
flatbuffers        2.0
fonttools          4.33.3
frozenlist         1.3.0
fsspec             2022.5.0
future             0.18.2
g2p-en             2.1.0
g2pM               0.1.2.5
h11                0.13.0
h5py               3.6.0
huggingface-hub    0.6.0
identify           2.5.1
idna               3.3
importlib-metadata 4.2.0
inflect            5.6.0
itsdangerous       2.1.2
jieba              0.42.1
Jinja2             3.1.2
joblib             1.1.0
jsonlines          3.0.0
kaldiio            2.17.2
kiwisolver         1.4.2
librosa            0.8.1
llvmlite           0.38.0
loguru             0.6.0
MarkupSafe         2.1.1
matplotlib         3.5.2
mccabe             0.6.1
mock               4.0.3
multidict          6.0.2
multiprocess       0.70.12.2
nara-wpe           0.0.8
nltk               3.7
nodeenv            1.6.0
numba              0.55.1
numpy              1.21.6
onnx               1.9.0
onnxruntime        1.11.1
opt-einsum         3.3.0
packaging          21.3
paddle-bfloat      0.1.2
paddle2onnx        0.9.6
paddleaudio        1.0.0
paddlefsl          1.1.0
paddlenlp          2.3.1
paddlepaddle       2.3.0
paddlepaddle-gpu   2.3.0.post112
paddlespeech       0.0.0
paddlespeech-feat  0.1.0
pandas             1.3.5
pathos             0.2.8
pattern-singleton  1.2.0
Pillow             9.1.1
pip                21.2.2
platformdirs       2.5.2
pooch              1.6.0
portalocker        2.4.0
pox                0.3.1
ppft               1.7.6.5
praatio            5.0.0
pre-commit         2.19.0
prettytable        3.3.0
protobuf           3.20.1
pyarrow            8.0.0
pycodestyle        2.8.0
pycparser          2.21
pycryptodome       3.14.1
pydantic           1.9.1
pyflakes           2.4.0
pyparsing          3.0.9
pypinyin           0.46.0
pypinyin-dict      0.2.0
pytest-runner      6.0.0
python-dateutil    2.8.2
pytz               2022.1
pyworld            0.3.0
PyYAML             6.0
regex              2022.4.24
requests           2.27.1
resampy            0.2.2
responses          0.18.0
sacrebleu          2.1.0
scikit-learn       1.0.2
scipy              1.7.3
sentencepiece      0.1.96
seqeval            1.2.2
setuptools         61.2.0
shellcheck-py      0.8.0.4
six                1.16.0
sniffio            1.2.0
SoundFile          0.10.3.post1
starlette          0.19.1
tabulate           0.8.9
TextGrid           1.5
threadpoolctl      3.1.0
timer              0.2.2
toml               0.10.2
tqdm               4.64.0
typeguard          2.13.3
typing_extensions  4.2.0
urllib3            1.26.9
uvicorn            0.17.6
virtualenv         20.14.1
visualdl           2.2.3
wcwidth            0.2.5
webrtcvad          2.0.10
websockets         10.3
Werkzeug           2.1.2
wheel              0.37.1
xxhash             3.0.0
yacs               0.1.8
yarl               1.7.2
zhon               1.1.5
zipp               3.8.0
我重新安装过一次环境，执行了 pip install paddlespeech -i https://pypi.tuna.tsinghua.edu.cn/simple
还是这个错误

Duplicate issue #2776: 使用命令行进行文字语言合成时，报错：“raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file”
Created: 2022-12-28T09:13:11Z
具体：
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也解压到项目根目录，但总是报错，不知道什么原因，求解？

Closing comment (2022-12-28T09:46:31Z): Duplicate of  #1925
应该还是没有正常解压到正确的位置, 注意是 ${HOME} 目录