Heroku模型部署成功,但未找到nltk.txt

Heroku模型部署成功,但未找到nltk.txt,heroku,nltk,Heroku,Nltk,我是Heroku部署的新手,正在部署一个文本分类器(python 3.6.7)。我遵循Heroku指南,在app文件夹的根目录中创建了一个nltk.txt文件。内容为“stopwords”(用于stopwords语料库)。但是,在部署过程中,会观察到以下日志消息: remote: -----> Downloading NLTK corpora… remote: ! 'nltk.txt' not found, not downloading any corpora

我是Heroku部署的新手,正在部署一个文本分类器(python 3.6.7)。我遵循Heroku指南,在app文件夹的根目录中创建了一个nltk.txt文件。内容为“stopwords”(用于stopwords语料库)。但是,在部署过程中,会观察到以下日志消息:

    remote: -----> Downloading NLTK corpora…
    remote:  !     'nltk.txt' not found, not downloading any corpora
    remote:  !     Learn more: https://devcenter.heroku.com/articles/python-nltk
虽然部署的模型似乎工作正常,但从观察到的消息来看,由于没有使用stopwords,我怀疑可能存在隐藏的问题


敬请告知,提前谢谢。

更新:这是一个令人惊讶的发现。虽然nltk.txt的名称显示为“nltk.txt”,但当我检查文件扩展名时,文件名实际上是“nltk.txt.txt”! 将文件名重命名为“nltk.txt”后,Heroku能够正确检测并加载nltk模块。问题解决了