On Thu, Jun 28, 2018 at 1:42 PM Ian Stapleton Cordasco < ***@***.***> wrote:
Are there any updates to this? It seems no one every commented as to
whether this is a problem with the third-party's support of Python 3.6 or
something else.
Further, it sounds like this is a problem on your local machine
> and I'm not certain how this is relevant to
the buildpack.
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
I have the same exact error with Python 3.6; i download the resources with nltk.download method. Then when i deploy get the following errors:
2019-01-15T05:23:23.773231+00:00 app[web.1]: **********************************************************************
2019-01-15T05:23:23.773232+00:00 app[web.1]: Resource �[93mstopwords�[0m not found.
2019-01-15T05:23:23.773234+00:00 app[web.1]: Please use the NLTK Downloader to obtain the resource:
2019-01-15T05:23:23.773236+00:00 app[web.1]:
2019-01-15T05:23:23.773237+00:00 app[web.1]: �[31m>>> import nltk
2019-01-15T05:23:23.773239+00:00 app[web.1]: >>> nltk.download('stopwords')
2019-01-15T05:23:23.773241+00:00 app[web.1]: �[0m
2019-01-15T05:23:23.773242+00:00 app[web.1]: Searched in:
2019-01-15T05:23:23.773248+00:00 app[web.1]: - '/code/nltk_data'
2019-01-15T05:23:23.773249+00:00 app[web.1]: - '/usr/share/nltk_data'
2019-01-15T05:23:23.773251+00:00 app[web.1]: - '/usr/local/share/nltk_data'
2019-01-15T05:23:23.773252+00:00 app[web.1]: - '/usr/lib/nltk_data'
2019-01-15T05:23:23.773254+00:00 app[web.1]: - '/usr/local/lib/nltk_data'
2019-01-15T05:23:23.773255+00:00 app[web.1]: - '/usr/local/nltk_data'
2019-01-15T05:23:23.773257+00:00 app[web.1]: - '/usr/local/share/nltk_data'
2019-01-15T05:23:23.773259+00:00 app[web.1]: - '/usr/local/lib/nltk_data'
2019-01-15T05:23:23.773260+00:00 app[web.1]: **********************************************************************
2019-01-15T05:23:23.773261+00:00 app[web.1]:
On Tue, Jun 16, 2020 at 7:06 AM Nikita Lalwani ***@***.***> wrote:
@ksednew
<
https://github.com/ksednew
> did you get any help with issue,
I'm having the same with my linux os
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
#685 (comment)
>,
or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/ABU4WSLKKN2XRNOSB3Y75I3RW5G4VANCNFSM4E3RPUUA
>
I am using below code to use stopwords through jupyter hub, I have hosted jupyter hub on AWS DLAMI Linux server.
python3 -m nltk.downloader stopwords
python3 -m nltk.downloader words
python3 -m nltk.downloader punkt
from nltk.corpus import words
from nltk.corpus import stopwords
python3
from nltk.corpus import stopwords
stop_words = set(stopwords.words("english"))
print(stop_words)
This works fine while running in python terminal.
But when I try below in Jupyternotebook its failing with error. Resource stopwords not found.
Please use the NLTK Downloader to obtain the resource:
$python3
import nltk
nltk.download('stopwords') [nltk_data] Downloading package stopwords to /root/nltk_data... [nltk_data] Package stopwords is already up-to-date!
Well, I still have the same problem. But one way to work around this was to download it to my local machine and then via Dockerfile copy that to my container.
This solved the problem to Heroku.
Regarding the problem, I suspect that in the pushing process, the content is downloaded and saved in a different path. That's the reason why the container couldn't find the nltk_data.
I will investigate this and if I found a better solution I will update it.
Experienced same error while working on google colab
run the command "nltk.download('stopwords')"in a separate cell just above the cell in which error occured.. i was facing the same issue in the colab but its running now.. after doing this.
it is working thank you.
i also facing the same issue if any one know the solution please let me know
LookupError Traceback (most recent call last)
File ~\anaconda3\lib\site-packages\nltk\corpus\util.py:84, in LazyCorpusLoader.__load(self)
83 try:
---> 84 root = nltk.data.find(f"{self.subdir}/{zip_name}")
85 except LookupError:
File ~\anaconda3\lib\site-packages\nltk\data.py:583, in find(resource_name, paths)
582 resource_not_found = f"\n{sep}\n{msg}\n{sep}\n"
--> 583 raise LookupError(resource_not_found)
LookupError:
Resource stopwords not found.
Please use the NLTK Downloader to obtain the resource:
import nltk
nltk.download('stopwords')
For more information see:
https://www.nltk.org/data.html
Attempted to load corpora/stopwords.zip/stopwords/
Searched in:
- 'C:\Users\Abhishek Pandey/nltk_data'
- 'C:\Users\Abhishek Pandey\anaconda3\nltk_data'
- 'C:\Users\Abhishek Pandey\anaconda3\share\nltk_data'
- 'C:\Users\Abhishek Pandey\anaconda3\lib\nltk_data'
- 'C:\Users\Abhishek Pandey\AppData\Roaming\nltk_data'
- 'C:\nltk_data'
- 'D:\nltk_data'
- 'E:\nltk_data'
- 'path_to_nltk_data'
During handling of the above exception, another exception occurred:
LookupError Traceback (most recent call last)
Input In [20], in <cell line: 1>()
----> 1 sw = stopwords.words('english')
File ~\anaconda3\lib\site-packages\nltk\corpus\util.py:121, in LazyCorpusLoader.
getattr
(self, attr)
118 if attr == "
bases
":
119 raise AttributeError("LazyCorpusLoader object has no attribute '
bases
'")
--> 121 self.__load()
122 # This looks circular, but its not, since __load() changes our
123 #
class
to something new:
124 return getattr(self, attr)
File ~\anaconda3\lib\site-packages\nltk\corpus\util.py:86, in LazyCorpusLoader.__load(self)
84 root = nltk.data.find(f"{self.subdir}/{zip_name}")
85 except LookupError:
---> 86 raise e
88 # Load the corpus.
89 corpus = self.__reader_cls(root, *self.__args, **self.__kwargs)
File ~\anaconda3\lib\site-packages\nltk\corpus\util.py:81, in LazyCorpusLoader.__load(self)
79 else:
80 try:
---> 81 root = nltk.data.find(f"{self.subdir}/{self.__name}")
82 except LookupError as e:
83 try:
File ~\anaconda3\lib\site-packages\nltk\data.py:583, in find(resource_name, paths)
581 sep = "*" * 70
582 resource_not_found = f"\n{sep}\n{msg}\n{sep}\n"
--> 583 raise LookupError(resource_not_found)
LookupError:
Resource stopwords not found.
Please use the NLTK Downloader to obtain the resource:
import nltk
nltk.download('stopwords')
For more information see:
https://www.nltk.org/data.html
Attempted to load corpora/stopwords
Searched in:
- 'C:\Users\Abhishek Pandey/nltk_data'
- 'C:\Users\Abhishek Pandey\anaconda3\nltk_data'
- 'C:\Users\Abhishek Pandey\anaconda3\share\nltk_data'
- 'C:\Users\Abhishek Pandey\anaconda3\lib\nltk_data'
- 'C:\Users\Abhishek Pandey\AppData\Roaming\nltk_data'
- 'C:\nltk_data'
- 'D:\nltk_data'
- 'E:\nltk_data'
- 'path_to_nltk_data'
This buildpack does not use Anaconda, and does not run on Windows - so has nothing to do with the more recent issues posted to this thread.
If you're having issues with NLTK or Anaconda, please first read their docs and failing that, follow any support/issue reporting processes they document instead:
https://www.nltk.org/
https://www.anaconda.com/
If someone has an issue with using NLTK
on Heroku
during a Heroku build (not locally), please open a support ticket (
https://help.heroku.com
).
I'm locking this issue now, since otherwise people finding this thread via search engines are just going to keep commenting here even though it has nothing to do with their problem.