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

Talk Python's Mastodon Michael Kennedy's Mastodon