C3W1_Practice_Assignment NLTK Network issue?

Hello.

I am going through Course 3 - Week 1 of the NLP Specialization.
I was trying to complete Week 1’s Practice Assignment, but I got what I suspected was a networking issue when executing the first cell.

[nltk_data] Error loading twitter_samples: <urlopen error [Errno -5]
[nltk_data]     No address associated with hostname>
[nltk_data] Error loading stopwords: <urlopen error [Errno -5] No
[nltk_data]     address associated with hostname>
[nltk_data] Error loading averaged_perceptron_tagger: <urlopen error
[nltk_data]     [Errno -5] No address associated with hostname>
[nltk_data] Error loading wordnet: <urlopen error [Errno -5] No
[nltk_data]     address associated with hostname>
---------------------------------------------------------------------------
LookupError                               Traceback (most recent call last)
File /usr/local/lib/python3.8/dist-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 /usr/local/lib/python3.8/dist-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:
    - '/home/jovyan/work/nltk_data'
    - '/root/nltk_data'
    - '/usr/nltk_data'
    - '/usr/share/nltk_data'
    - '/usr/lib/nltk_data'
    - '/usr/share/nltk_data'
    - '/usr/local/share/nltk_data'
    - '/usr/lib/nltk_data'
    - '/usr/local/lib/nltk_data'
**********************************************************************

I also tried downloading other NLTK data packages without success (see attached screenshot).

I will try again tomorrow because this is probably a transient DNS error, but I figured I would let the community know if there is anything I might be missing.

Thanks!

1 Like

@lucas.coutinho another learner with same error. please look into this, I already reported about this error to you on the other post.

@fabricio there are some issues going on and off with url external link download causing error in some assignments. sorry for the inconvenience. please wait for the staff to work upon.

1 Like

@Deepti_Prasad Thanks a lot, madame.

I just checked this morning, and the error persists, @Deepti_Prasad @lucas.coutinho .

Is there anything I can do to help?

Hi @fabricio,

We are facing an issue with external connections in Coursera. I will manually download the desired stopwords and place them in the notebook, adjusting the code accordingly.

I will do this by EOD today, and I let you know once the change is published.

I’m sorry for the inconvenience.

Thanks,
Lucas

3 Likes

Hey @lucas.coutinho

I have tagged you with similar threads for same error, I hope checked them too. I know you are busy person because of the recent course testing, so didn’t bug you personally.

Practice 1 assignment of Course 3, almost 3 learners had same issue, in fact when I tried even I got the same error but I didn’t get this earlier in January 2024!!!

Regards
DP

1 Like

Hi @Deepti_Prasad and @fabricio

The issue is fixed. Please let me know if it still persists. You probably will need to refresh your workspace to see the changes.

Thanks,
Lucas

3 Likes

It is indeed working correctly now @lucas.coutinho
Thanks a lot for taking the time, sir.
I really appreciate your help with the issue.