C3_W1 Practice Assignment Import Library Issue

Hi there, I just start the course 3 week 1 material and I was trying to start on the Practice Assignment of Tensorflow (which is optional), but I encounter issue while importing the library. I have tried shutting down kernal, shutting down the whole notebook, updating latest version, none of those help. I haven’t touch the utils.py so the file is as it is, hopefully someone can offer a solution since I couldn’t start the first step as load_tweet wasn’t import since the error came up before that. (sorry for missing the week tag, i tried to put it in but the system asked me to remove it…)




1 Like

Hi @moshan

The error indicates that it is unable find stopwords from nltk. Did you try downloading it using nltk.download('stopwords')?

Did you update your notebook to the latest version via pushing the end date? If yes, try reverting your notebook to the latest previous checkpoint.

1 Like

Hi Alireza,

Do you mean i should revise the import library cell by adding the nltk.download(‘stopwords’) statement?

i update to latest version by file->open then pressed help, i just started (“enrolled”) the cource today~

1 Like

No, your code must be like this:

import nltk
nltk.download('stopwords')

After downloading the stopwords, you can access them using the following code:

from nltk.corpus import stopwords
stop_words = stopwords.words('english')

1 Like

This cell cannot be modified

according to instruction the cell is frozen since it isn’t part of the submission

1 Like

Try adding the code on the valid cells where you can edit unless the first cell is generating this error. If that doesn’t work, the problem might not be from your code!

I don’t know if you are allowed to do that but you may need to add these codes to the utils.py file!

1 Like

Not sure what happened but tried again this morning and it works… Thanks for the help!

1 Like

Glad to hear that! You’re welcome :raised_hands:

1 Like