Coder Social home page Coder Social logo

Comments (3)

Hoyyyaard avatar Hoyyyaard commented on May 26, 2024

Traceback (most recent call last):
File "debug.py", line 15, in
predictor = Predictor.from_path('/mnt/cephfs/home/zhihongyan/VLN/DUET/datasets/elmo')
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/site-packages/allennlp/predictors/predictor.py", line 364, in from_path
plugins.import_plugins()
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/site-packages/allennlp/common/plugins.py", line 79, in import_plugins
import_module_and_submodules(
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/site-packages/allennlp/common/util.py", line 362, in import_module_and_submodules
import_module_and_submodules(subpackage, exclude=exclude)
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/site-packages/allennlp/common/util.py", line 351, in import_module_and_submodules
module = importlib.import_module(package_name)
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 843, in exec_module
File "", line 219, in _call_with_frames_removed
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/site-packages/allennlp/commands/init.py", line 32, in
from allennlp.commands.checklist import CheckList
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/site-packages/allennlp/commands/checklist.py", line 22, in
from allennlp.confidence_checks.task_checklists.task_suite import TaskSuite
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/site-packages/allennlp/confidence_checks/task_checklists/init.py", line 4, in
from allennlp.confidence_checks.task_checklists.task_suite import TaskSuite
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/site-packages/allennlp/confidence_checks/task_checklists/task_suite.py", line 9, in
from checklist.perturb import Perturb
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/site-packages/checklist/perturb.py", line 7, in
from pattern.en import tenses
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/site-packages/pattern/text/en/init.py", line 61, in
from pattern.text.en.inflect import (
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/site-packages/pattern/text/en/init.py", line 80, in
from pattern.text.en import wordnet
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/site-packages/pattern/text/en/wordnet/init.py", line 57, in
nltk.data.find("corpora/" + token)
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/site-packages/nltk/data.py", line 555, in find
return find(modified_name, paths)
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/site-packages/nltk/data.py", line 542, in find
return ZipFilePathPointer(p, zipentry)
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/site-packages/nltk/compat.py", line 41, in _decorator
return init_func(*args, **kwargs)
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/site-packages/nltk/data.py", line 394, in init
zipfile = OpenOnDemandZipFile(os.path.abspath(zipfile))
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/site-packages/nltk/compat.py", line 41, in _decorator
return init_func(*args, **kwargs)
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/site-packages/nltk/data.py", line 935, in init
zipfile.ZipFile.init(self, filename)
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/zipfile.py", line 1269, in init
self._RealGetContents()
File "/mnt/cephfs/home/zhihongyan/anaconda3/envs/vlnduet_probe/lib/python3.8/zipfile.py", line 1336, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

from allennlp.

epwalsh avatar epwalsh commented on May 26, 2024

I believe we've encountered this before. It's an issue with race conditions in NLTK when it tries to download the same corpora from two processes at the same time. You end up with a corrupted download. Try this:

# Remove existing corrupted NLTK downloads
rm -rf ~/nltk_data
# Re-download everything
python -c 'import nltk; [nltk.download(p) for p in ("wordnet", "wordnet_ic", "sentiwordnet", "omw", "omw-1.4")]'

from allennlp.

github-actions avatar github-actions commented on May 26, 2024

This issue is being closed due to lack of activity. If you think it still needs to be addressed, please comment on this thread 👇

from allennlp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.