Adding objects to weaviate with custom model fails because nltk.download('punkt') is NOT executed for custom models.
This happens because nltk.download('punkt') is only in the download.py script, which is not executed for custom models.
>>> try:
.. client.data_object.create(data_obj, "Article")
.. except weaviate.UnexpectedStatusCodeException as error:
.. print(error.json['error'][0]['message'])
fail with status 500:
**********************************************************************
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:
- '/root/nltk_data'
- '/usr/local/nltk_data'
- '/usr/local/share/nltk_data'
- '/usr/local/lib/nltk_data'
- '/usr/share/nltk_data'
- '/usr/local/share/nltk_data'
- '/usr/lib/nltk_data'
- '/usr/local/lib/nltk_data'
- ''
**********************************************************************
Adding objects to weaviate with custom model fails because
nltk.download('punkt')
is NOT executed for custom models. This happens becausenltk.download('punkt')
is only in thedownload.py
script, which is not executed for custom models.