Okay.
So in this lecture, I want to show you what you can do if you get a 403 error when trying to download
a file from lazy programmers.
Me So sometimes my host just acts up and it won't let you download the file.
It's probably not going to happen right now as I do this because it doesn't happen in most cases, but
sometimes it does very occasionally.
So I want to show you what you can do if this doesn't work.
So you can see this time it turns out to work.
So let me delete this file.
So the file is there because we did download it successfully.
So I'm just going to ram this file.
And I want to show you what you can do instead if you get a 403.
So basically, I think we tend to when we're doing something complex like data science, we forget simple
things.
For instance, how can you get this file?
Let's say you go to 403.
What could you do?
Well, probably the reason why you're getting a 403 is not because the download is not working.
It's because the host is probably trying to block CoLab or because CoLab is public.
You have all sorts of people using the same IP addresses and the host may have flagged one of these
IP addresses as a bad IP.
So what you can do is you can just download this file.
Normally in the web browser, you just copy and paste the URL, download the file, and now you have
the file.
Okay, so I'm not going to download it because I already have it, but from there what you could do
is you click this little folder icon on the left side and here you have a file explorer and you can
just drag and drop files into this little window.
So here I have airline passengers, dot CSV.
You just drag it in and it will upload.
Okay, so now the file is uploaded.
Let's close this and let's again see where this file is.
Okay, so the file is right here.
So basically all you have to do is keep going.
Right.
So everything works as expected.
So the only difference is that instead of downloading the file automatically in the notebook, you're
downloading the file yourself and then putting it in the same location where it would have been if you
had just downloaded it like this.
And again, there's nothing we can really do about this because, you know, these are public IP addresses.
So if people misbehave and the IP addresses stop being trusted, then that's what happens.