heroku-buildpack-python: Error downloading NLTK corpora
Hi, we are no longer able to download and install the NLTK corpora via this build pack.
We receive the deployment error below, no matter the packages listed in the nltk.txt file:
remote: -----> Downloading NLTK corpora...
remote: -----> Downloading NLTK packages: wordnet brown punkt averaged_perceptron_tagger
remote: [nltk_data] Error loading wordnet brown punkt
remote: [nltk_data] averaged_perceptron_tagger : Package 'wordnet brown
remote: Traceback (most recent call last):
remote: File "/app/.heroku/python/lib/python2.7/runpy.py", line 174, in _run_module_as_main
remote: "__main__", fname, loader, pkg_name)
remote: File "/app/.heroku/python/lib/python2.7/runpy.py", line 72, in _run_code
remote: exec code in run_globals
remote: [nltk_data] punkt averaged_perceptron_tagger ' not found in index
remote: Error installing package. Retry? [n/y/e]
remote: File "/tmp/build_5f9f482255a2eae0e0f03f81ed130b83/.heroku/python/lib/python2.7/site-packages/nltk/downloader.py", line 2267, in <module>
remote: halt_on_error=options.halt_on_error)
remote: File "/tmp/build_5f9f482255a2eae0e0f03f81ed130b83/.heroku/python/lib/python2.7/site-packages/nltk/downloader.py", line 675, in download
remote: choice = compat.raw_input().strip()
remote: EOFError: EOF when reading a line
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 5
- Comments: 24 (12 by maintainers)
It looks like your
nltk.txthas windows line endings, which aren’t currently handled gracefully by this buildpack’s nltk step. I’d recommend converting it to unix endings (and for the rest of the repository too; generally windows line endings are not recommended since they break bash and others). See: https://help.github.com/articles/dealing-with-line-endings/yes, all good now. thanks @edmorley!