1
00:00:10,930 --> 00:00:11,290
Okay.

2
00:00:11,290 --> 00:00:17,260
So in this lecture, I want to show you what you can do if you get a 403 error when trying to download

3
00:00:17,260 --> 00:00:19,980
a file from lazy programmers.

4
00:00:19,990 --> 00:00:24,730
Me So sometimes my host just acts up and it won't let you download the file.

5
00:00:25,090 --> 00:00:32,200
It's probably not going to happen right now as I do this because it doesn't happen in most cases, but

6
00:00:32,200 --> 00:00:34,570
sometimes it does very occasionally.

7
00:00:34,570 --> 00:00:38,170
So I want to show you what you can do if this doesn't work.

8
00:00:38,500 --> 00:00:40,900
So you can see this time it turns out to work.

9
00:00:41,980 --> 00:00:43,660
So let me delete this file.

10
00:00:45,310 --> 00:00:49,570
So the file is there because we did download it successfully.

11
00:00:50,230 --> 00:00:52,690
So I'm just going to ram this file.

12
00:00:57,740 --> 00:01:01,340
And I want to show you what you can do instead if you get a 403.

13
00:01:02,330 --> 00:01:08,750
So basically, I think we tend to when we're doing something complex like data science, we forget simple

14
00:01:08,750 --> 00:01:09,430
things.

15
00:01:09,440 --> 00:01:12,080
For instance, how can you get this file?

16
00:01:12,080 --> 00:01:13,090
Let's say you go to 403.

17
00:01:13,100 --> 00:01:14,150
What could you do?

18
00:01:14,270 --> 00:01:19,400
Well, probably the reason why you're getting a 403 is not because the download is not working.

19
00:01:19,520 --> 00:01:24,080
It's because the host is probably trying to block CoLab or because CoLab is public.

20
00:01:24,110 --> 00:01:30,170
You have all sorts of people using the same IP addresses and the host may have flagged one of these

21
00:01:30,200 --> 00:01:32,000
IP addresses as a bad IP.

22
00:01:32,870 --> 00:01:35,780
So what you can do is you can just download this file.

23
00:01:35,780 --> 00:01:42,260
Normally in the web browser, you just copy and paste the URL, download the file, and now you have

24
00:01:42,260 --> 00:01:42,950
the file.

25
00:01:43,480 --> 00:01:48,200
Okay, so I'm not going to download it because I already have it, but from there what you could do

26
00:01:48,590 --> 00:01:57,810
is you click this little folder icon on the left side and here you have a file explorer and you can

27
00:01:57,810 --> 00:02:01,320
just drag and drop files into this little window.

28
00:02:01,890 --> 00:02:04,800
So here I have airline passengers, dot CSV.

29
00:02:05,070 --> 00:02:08,400
You just drag it in and it will upload.

30
00:02:09,540 --> 00:02:11,190
Okay, so now the file is uploaded.

31
00:02:12,090 --> 00:02:18,180
Let's close this and let's again see where this file is.

32
00:02:18,630 --> 00:02:19,830
Okay, so the file is right here.

33
00:02:19,830 --> 00:02:24,600
So basically all you have to do is keep going.

34
00:02:26,100 --> 00:02:26,430
Right.

35
00:02:26,430 --> 00:02:28,020
So everything works as expected.

36
00:02:28,020 --> 00:02:34,380
So the only difference is that instead of downloading the file automatically in the notebook, you're

37
00:02:34,380 --> 00:02:38,820
downloading the file yourself and then putting it in the same location where it would have been if you

38
00:02:38,820 --> 00:02:40,650
had just downloaded it like this.

39
00:02:41,410 --> 00:02:46,090
And again, there's nothing we can really do about this because, you know, these are public IP addresses.

40
00:02:46,090 --> 00:02:52,330
So if people misbehave and the IP addresses stop being trusted, then that's what happens.
