mitre-attack/tram

Punkt not found

robomotic opened this issue · 1 comments

Please Describe The Bug

System: MAC OSX
Python version: 3.7.7
Pyenv as local environment

I followed the steps from the README this is the error I get:

(tram) paolo-mac:tram paolo$ python tram.py
INFO:root:Welcome to TRAM
DEBUG:asyncio:Using selector: KqueueSelector
Traceback (most recent call last):
  File "tram.py", line 117, in <module>
    website_handler = WebAPI(services=services)
  File "/Users/paolo/tram/handlers/web_api.py", line 16, in __init__
    self.tokenizer_sen = nltk.data.load('tokenizers/punkt/english.pickle')
  File "/Users/paolo/.pyenv/versions/tram/lib/python3.7/site-packages/nltk/data.py", line 868, in load
    opened_resource = _open(resource_url)
  File "/Users/paolo/.pyenv/versions/tram/lib/python3.7/site-packages/nltk/data.py", line 993, in _open
    return find(path_, path + ['']).open()
  File "/Users/paolo/.pyenv/versions/tram/lib/python3.7/site-packages/nltk/data.py", line 701, in find
    raise LookupError(resource_not_found)
LookupError: 
**********************************************************************
  Resource punkt not found.
  Please use the NLTK Downloader to obtain the resource:

  >>> import nltk
  >>> nltk.download('punkt')
  
  For more information see: https://www.nltk.org/data.html

  Attempted to load tokenizers/punkt/PY3/english.pickle

  Searched in:
    - '/Users/paolo/nltk_data'
    - '/Users/paolo/.pyenv/versions/tram/nltk_data'
    - '/Users/paolo/.pyenv/versions/tram/share/nltk_data'
    - '/Users/paolo/.pyenv/versions/tram/lib/nltk_data'
    - '/usr/share/nltk_data'
    - '/usr/local/share/nltk_data'
    - '/usr/lib/nltk_data'
    - '/usr/local/lib/nltk_data'
    - ''
**********************************************************************

There should be a check to auto download the punct model during boot.
Cheers.

Ops just saw this in another issue. Closing.