C1W4 Getting error - [Errno 2] No such file or directory: '/tmp/h-or-s/'

Currently doing the final programming assignment and I am getting this error - [Errno 2] No such file or directory: ‘/tmp/h-or-s/’ .

Saw posts related to this topic here, but I think my notebook seems to be missing some code for getting these files.

here are some of the images -

(moderator edit: removed graded code)

I have tried to update the lab (from the help section), but there seems to be no change and I am getting the same error.

can someone please explain what to do?

Hello @VooDooDarkMagic ,

Check these links :

  1. TF1: How to check your notebook’s metadata
  2. how-to-refresh-your-workspace

With regards,
Nilosree Sengupta

Hi @VooDooDarkMagic

Welcome to the community.

You can try to refresh your assignment:

H​ow to Refresh your Workspace:

O​ption 1 - Using Lab Help

  1. O​pen the assignment.
  2. After the assignment opens up, c​lick "File" (top left) and then "Open…"
  3. W​hen your workspace opens, select the check box before your assignment file. After it is selected, press "Shutdown".
  4. U​sing the same procedure mentioned above, "Rename" your file. For instance you can change it from assignment_name.ipynb to assignment_name_v2.ipynb. By doing this you’ll be able to save your current progress on the assignment after the latest assignment file is fetched.
  5. Using the same procedure, "Delete" any other file, if any, that you want to get a fresh copy of.
  6. After renaming your file, click on the "Help" button on the top right of the page. From the panel that opens, click "Get latest version" button, and then "Update lab".
  7. A​fter the page reloads go to File → Open… , as described in (2)
  8. Now you’ll see two notebook files. The one you renamed (as done in step 4) will have your previous progress, and the latest version. (Depending on how many previous versions you have kept saved, you could have more than two assignment files in the worksapce)

O​ption 2 - via URL

metadata seems to be a file (it has the “tags” keyword), refreshed the workspace, still getting the same thing.

I was looking at some of the posts with similar issues and found this and I think my notebook is missing the following code -

from os import path, getcwd, chdir
path = f"{getcwd()}/…/tmp2/happy-or-sad.zip"

zip_ref = zipfile.ZipFile(path, ‘r’)

I did try to manually add them but it doesn’t seem to work either.

Hello @VooDooDarkMagic ,

Oh I see!
Refresh your lab. Check the link given above.

With regards,
Nilosree Sengupta