Lesson 5 - 'Not a gzipped file (b'\x80\x03')'


Uploaded the MNIST file to GCP, yet when I run “with gzip.open(path/‘mnist.pkl.gz’, ‘rb’) as f:
((x_train, y_train), (x_valid, y_valid), _) = pickle.load(f, encoding=‘latin-1’)”, I get the above message - any suggestions?

From what I gathered so far was that either something could have gone wrong in the download (no firewalls though) or the file is not an actual gzipped file despite the gz extension.

(Yijin) #2

Maybe try an additional check on the gz file with the gzip executable, outside of python environment? See here.