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

error issue if zipfile.BadZipFile: File is not a zip file #160

Open
saikiranreddygangidi opened this issue Aug 25, 2020 · 0 comments
Open

Comments

@saikiranreddygangidi
Copy link

when i try to use nltk.pos_tag("price")

it showing the belong error I had tried different things but doesn't worked out.

import nltk
nltk.pos_tag("price")
Traceback (most recent call last):
File "<pyshell#1>", line 1, in
nltk.pos_tag("price")
File "C:\Users\Anirudh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\nltk\tag_init_.py", line 161, in pos_tag
tagger = get_tagger(lang)
File "C:\Users\Anirudh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\nltk\tag_init
.py", line 107, in _get_tagger
tagger = PerceptronTagger()
File "C:\Users\Anirudh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\nltk\tag\perceptron.py", line 144, in init
find('taggers/averaged_perceptron_tagger/' + PICKLE)
File "C:\Users\Anirudh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\nltk\data.py", line 673, in find
return find(modified_name, paths)
File "C:\Users\Anirudh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\nltk\data.py", line 660, in find
return ZipFilePathPointer(p, zipentry)
File "C:\Users\Anirudh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\nltk\compat.py", line 228, in _decorator
return init_func(*args, **kwargs)
File "C:\Users\Anirudh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\nltk\data.py", line 506, in init
zipfile = OpenOnDemandZipFile(os.path.abspath(zipfile))
File "C:\Users\Anirudh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\nltk\compat.py", line 228, in _decorator
return init_func(*args, **kwargs)
File "C:\Users\Anirudh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\nltk\data.py", line 1055, in init
zipfile.ZipFile.init(self, filename)
File "C:\Users\Anirudh\AppData\Local\Programs\Python\Python36-32\lib\zipfile.py", line 1108, in init
self._RealGetContents()
File "C:\Users\Anirudh\AppData\Local\Programs\Python\Python36-32\lib\zipfile.py", line 1175, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

please share solution for this issue.

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

1 participant