ImportError: cannot import name 'process_tweet' from 'utils'

I’m presently taking Natural Language Processing specialization via Coursera.

I couldn’t progress with the week 1 assignment because of the error encounter. The error is "ImportError: cannot import name ‘process_tweet’ from ‘utils’ ".

Error message screenshot is attached. I have searched online resources including Google search and YouTube without solution.

ImportError: cannot import name 'process_tweet' from 'utils' (C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\utils\

Please help to resolve

1 Like

You need to post in the specializations relevant page not in discussion (I changed that this time).

Are you running this on your machine or Coursera?

If in Coursera, I am not sure you might have deleted something; its better to do a Lab reset first, check this:

and then run all cells from scratch again!

1 Like

Thank you for your support. I used my machine and not lab. It runs well in the Lab but throw me error when using my machine

1 Like

This is because you also need to use the utils file which contains the necessary imports used in the Lab file! Go to File-> Open and check the utils files, others adaptions might be necessary as well such as Python version and TF version…

1 Like

If you run the notebooks locally, you need all the files, not just the notebook. Here’s a thread about how to download all the files, but that’s also only the start. Then you need exactly the same versions of all the various packages that are used. There is no easy or “official” way to accomplish that, but here is a thread that gets you started down that road. There are too many possibilities for us to support you in that: you’ll need to figure it out yourself.

You’re really better off just running the assignments on the course website.