datapythonista / mnist

Python utilities to download and parse the MNIST dataset
BSD 3-Clause "New" or "Revised" License
132 stars 59 forks source link

HTTP 403 returned from http://yann.lecun.com/exdb/mnist/ when downloading .gz files #20

Open mahtin opened 4 months ago

mahtin commented 4 months ago

Sadly the yann.lecun.com website is returning HTTP 403 errors when downloading the .gz files. Even after adding headers to the urlfetch() to make it look more like a browser, it still fails. (It fails in a browser also!).

This one line fix is all that I needed to get the code working. I used a different URL to download from.

< datasets_url = 'http://yann.lecun.com/exdb/mnist/'
> datasets_url = 'https://storage.googleapis.com/cvdf-datasets/mnist/'

This simple fix solves the issue until the website responds cleanly. It would be better to fix the website as this code is in a lot of places.

headingy commented 2 months ago

You save my day. Thanks