Python for Absolute Beginners Transcripts
Chapter: Welcome to the course
Lecture: How do I get help?

Login or purchase this course to watch this video and the rest of the course contents.
0:00 We're nowhere ready to start writing code yet.
0:02 We maybe don't even have Python or Editor set up.
0:04 I want to start right from the beginning
0:07 talking about how do you get help.
0:09 Because who knows what stage of this whole process
0:12 of learning Python and going through this course
0:14 you might run into troubles.
0:15 So lets right up front talk about how you might get help
0:18 either with a set up problem or with running some code.
0:22 So you go run your program
0:23 and instead of something beautiful happening you get this.
0:27 I'm seeing lots of red
0:28 little hyperlinks pointing at our files
0:30 and at the bottom down here
0:32 you see that there's this attribute error.
0:34 These are called exceptions.
0:36 And this is not good.
0:37 This means that your program has crashed
0:40 and it's not running any more.
0:41 Notice how it says process finished with exit code 1.
0:44 That might sound good. It's not good.
0:47 Zero is what you want.
0:48 If it's not zero, chances are it's bad.
0:51 So here we can see a little bit of details
0:53 about this error.
0:54 We can see that the line of code
0:56 that actually caused that problem text = text.lower()
1:00 don't worry about what that means yet.
1:02 But that's the line where it crashed.
1:03 And then below it, there's a description of the error.
1:05 There's an attribute error.
1:07 NoneType object has no attribute lower.
1:10 This is actually I think is the most common error
1:14 that you're ever going to run into in Python.
1:16 But there's many many of these.
1:18 So you're faced with this.
1:20 What do you do? Or you're faced with Python won't install.
1:23 Or won't run your file or whatever.
1:25 Doesn't matter what the details are.
1:27 What do we do?
1:28 Well, first of all, you take exactly that error text
1:31 and you put it into Google.
1:34 Maybe you've done this a bunch of times
1:35 and you're totally comfortable with it
1:36 but if you haven't tried this before
1:38 it's ridiculously effective.
1:40 If there's some kind of error number
1:42 oh man, sometimes that would be
1:44 you just put in some random number into Google
1:46 and it will give you exactly the solution that you need.
1:48 So yeah, just take that and put it straight into there.
1:51 Sometimes you want to be a little careful
1:53 if it has very specific information about like
1:55 your file name or something.
1:56 That can throw it off
1:58 but generally put the error straight here.
2:00 And that will probably take you to stack overflow
2:02 which is the place I was talking about before.
2:04 Here you can see somebody says
2:05 Hey, I'm trying to predict this thing
2:07 and I'm doing this
2:08 but instead what I get is this attribute error.
2:11 And it's not on the screen here
2:12 but if you scroll down they say
2:13 Well here's the cause of this
2:14 and here's what's happening.
2:15 And so the problem is
2:16 you actually need to clean your data values
2:19 because some of them
2:20 they're not set and that's what's making it crash.
2:23 It's not a super solution they gave
2:24 but it's a pretty good one.
2:26 It's hard to give the exact solution
2:27 because it's such a general error.
2:29 Anyway, first thing, Google it.
2:33 The next thing is, if it's actually running
2:36 we're going to have our editor.
2:37 This is the editor we're going to use.
2:39 If it's running, you can put it into a debugger
2:41 and put a breakpoint.
2:42 See this line 29 here? The main part of the screen
2:44 where the little red dot is.
2:46 You click in that little area where the little red dot is
2:49 it will toggle what's called a breakpoint.
2:50 And when you run your code it will stop there.
2:53 And look at all the gray on the screen by the code.
2:56 Now don't worry about what the code is.
2:58 But notice how it says like html
2:59 is this big bunch of html stuff.
3:02 And Shoop is something and header is h1
3:04 Episode 220 machine learning in the cloud with Azure.
3:07 Those are the current values of all the pieces of data
3:11 and variables you're working with.
3:13 Also, down here you can inspect what's happening and
3:16 go step by step and
3:17 down here you can even expand the values and
3:21 interact with them and change them
3:22 to see what effect that might have.
3:24 So if you're unsure what's happening
3:25 maybe you're working with the value that's what you
3:28 exactly expected.
3:29 You can put it in this debugger.
3:30 We're going to do this later.
3:31 Again, it doesn't have to make sense now.
3:32 I just want to make sure
3:33 you have this right at the beginning in case you get stuck.
3:35 Another thing you can do.
3:37 After you've try to figure it out yourself and
3:39 can't get this.
3:40 You can come over to the course repository on GitHub.
3:45 In the setup chapter, I'll give you details on how to get to this
3:47 for this particular course
3:49 but also on your course page when you're
3:51 logged in the the website.
3:52 It's just a big link right at the top.
3:54 So, over here there's an issues section and
3:57 maybe someone else has already had a problem that you've
4:00 run into.
4:01 So here you can see a problem that's closed that somebody
4:02 came here and said
4:04 Hey, I'm having this problem with SSL certificate and
4:07 I'm trying to do this thing to talk over the web
4:10 with my Python program.
4:11 It looked like it worked in your video
4:13 but then when I try it. I get this.
4:15 And we have this little conversation and
4:16 we figure out what the fix actually is.
4:19 So maybe
4:20 if you go here and you see Closed issues
4:22 or even Open ones
4:23 but probably Closed ones
4:25 you can actually see what happened.
4:26 Other students are running into and talking about that.
4:29 If you don't see something, you can ask a question
4:31 just like this
4:32 Hey, this is happening.
4:33 I not suer why.
4:34 Could you help?"
4:35 Okay, so that's an option.
4:37 And then finally I have
4:38 office hours where you can come
4:40 and chat.
4:41 We can do screen sharing
4:42 we can look at your programs.
4:43 See what's happening and so on.
4:44 So on your course page, you're have this section
4:47 that says, "Come to our next office hour."
4:50 If this isn't here
4:51 that means one's not currently scheduled.
4:53 Maybe I'm away traveling or something like that.
4:55 But one will appear again here.
4:57 You can go to your account page
4:59 and actually say
5:00 Send me an email anytime a new office hour is scheduled.
5:02 You can go ahead and do that as well if you want.
5:04 But these are the four ways;
5:06 Google it
5:07 put it in the debugger
5:08 if it's a programming run time thing
5:10 check out the issues for the course repository page
5:12 come to office hours.
5:14 I hope you don't get stuck at all
5:16 but if you do
5:17 I hope you get unstuck quickly.