Fail to use attached python files

Hello! I want to download and use the course material on my local computer. For some reason I cannot load the attached script (test_utils and cnn_utils) in my local machine, and it has resulted in errors because I need the functions to load datasets. I have made sure that they are all under the same folder, could anybody pinpoint the problem?

Thank you in advance!

I have also encountered this error when I loaded cnn_utils alone:

See the FAQ for the DLS courses. Read the section on accessing your notebook after you complete the course.

1 Like

I have followed the thread and downloaded all the files, yet I’m still unable to use the provided function. Do you have any more suggestions? I have followed the thread on one of the assignments and it works … but not here?



What error you are getting when importing


1 Like

If the file is there in the same directory as the notebook, but the “import” fails, then what that means is that the “current working directory” of your notebook is not what you think it is. Try adding a new cell before the “import” cell that contains exactly these commands:

!ls -l

The exclamation point there is an “escape” that tells the notebook to run those as linux shell commands instead of python code. That will tell you what the current working directory and then will list the contents of that directory. My prediction is that you will not see in that directory.

Now you have to figure out how to “cd” to the appropriate directory.

1 Like

no module named
Thank you!

Thank you sir. This has solved my issues. Virtual environment really confused me!