C4W3_Assignment

make the data directory
try:
  os.mkdir('/tmp/anime')
except OSError:
  pass

# download the zipped dataset to the data directory
data_url = "https://storage.googleapis.com/laurencemoroney-blog.appspot.com/Resources/anime-faces.zip"
data_file_name = "animefaces.zip"
download_dir = '/tmp/anime/'
urllib.request.urlretrieve(data_url, data_file_name)

# extract the zip file
zip_ref = zipfile.ZipFile(data_file_name, 'r')
zip_ref.extractall(download_dir)
zip_ref.close()

then get an error

HTTPError                                 Traceback (most recent call last)
<ipython-input-3-34b559a04612> in <module>
      9 data_file_name = "animefaces.zip"
     10 download_dir = '/tmp/anime/'
---> 11 urllib.request.urlretrieve(data_url, data_file_name)
     12 
     13 # extract the zip file

6 frames
/usr/lib/python3.8/urllib/request.py in http_error_default(self, req, fp, code, msg, hdrs)
    647 class HTTPDefaultErrorHandler(BaseHandler):
    648     def http_error_default(self, req, fp, code, msg, hdrs):
--> 649         raise HTTPError(req.full_url, code, msg, hdrs, fp)
    650 
    651 class HTTPRedirectHandler(BaseHandler):

HTTPError: HTTP Error 404: Not Found

is that URL wrong, or I do some thing wrong?

@794406612, you’re not doing anything wrong. The GCP bucket containing this file (and others for this course) is down. This issue has been escalated and they are trying to get it back up asap.

Watch this topic for updates.

ok. it seems I should wait until they fix this problem, thank you very much.

1 Like

@794406612 Thank you very much, I just logged into this forum to report the same issue and you’ve beaten me to it. Oh well, will just have to wait.