ptwobrussell/Recipes-for-Mining-Twitter — Issue #4: Weird bug with Summarizing Link Target recipe
Author: EugeneLiang
Created: 2012-02-28 09:30:29+00:00
State: open

Hi there!

I was trying out the Summarizing Link Target and i received the following error:

( i named the file as twitter_solution.py )

Traceback (most recent call last):
File "twitter_solution.py", line 127, in
summary = summarize(clean_page)
File "twitter_solution.py", line 76, in summarize
sentences = [s for s in nltk.tokenize.sent_tokenize(txt)]
File "/usr/lib/pymodules/python2.6/nltk/tokenize/__init__.py", line 43, in sent_tokenize
tokenizer = nltk.data.load('tokenizers/punkt/english.pickle')
File "/usr/lib/pymodules/python2.6/nltk/data.py", line 590, in load
resource_val = pickle.load(_open(resource_url))
File "/usr/lib/pymodules/python2.6/nltk/data.py", line 669, in _open
return find(path).open()
File "/usr/lib/pymodules/python2.6/nltk/data.py", line 439, in find
try: return find(modified_name)
File "/usr/lib/pymodules/python2.6/nltk/data.py", line 429, in find
try: return ZipFilePathPointer(p, zipentry)
File "/usr/lib/pymodules/python2.6/nltk/data.py", line 306, in __init__
zipfile = OpenOnDemandZipFile(os.path.abspath(zipfile))
File "/usr/lib/pymodules/python2.6/nltk/data.py", line 721, in __init__
zipfile.ZipFile.__init__(self, filename)
File "/usr/lib/python2.6/zipfile.py", line 696, in __init__
self._GetContents()
File "/usr/lib/python2.6/zipfile.py", line 716, in _GetContents
self._RealGetContents()
File "/usr/lib/python2.6/zipfile.py", line 728, in _RealGetContents
raise BadZipfile, "File is not a zip file"
zipfile.BadZipfile: File is not a zip file

May i know if there's anything wrong ?

I am using NLTK 2.0b8 on my Ubuntu 10.04 computer.

May i know how do i fix this issue ?

Thanks!