Blender Python Tutorial : Read an Error Message and how to Fix it [learn python for beginners]
Aug 14, 2023
Blender Python Tutorial : Read an Error Message and how to Fix it [learn python for beginners]
In this quick Blender Python Tutorial, we will be taking a look at an error message and how we can fix it. Looking to learn Python for beginners? You are in the right place. Be sure to check out the Scripting Playlist!. You may or may not have had this same error message or you may have one similar. I wanted to show you how we can use the Info window to read the Error Message. Once we understand what the problem is, we can easily fix it by removing the invalid code and replacing it with the correct one. Even though this was a simple fix, though some Error messages are more complex but by reading the error message we can get a better understanding of the problem. If you want more videos about error messages, be sure to let me know in the comments below!. I hope you find this Blender Python Tutorial helpful and as always Thanks for watching! Blender 2.90 Tutorial, learn python scripting (for beginners)
Content
0.32 -> Hey everybody and welcome back to another python scripting tutorial
3.74 -> though this time, It's the first in blender 2.9
6.56 -> So as I mentioned in the last video, I want to take a look at an error message and how we can fix it
10.96 -> So let's go ahead and jump right in
12.64 -> i'm going to change this to the scripting workspace
16.32 -> Then let's make a little bit of room over here
18.94 -> now, let's get rid of the python console
20.498 -> don't need it
23.359 -> So i've already installed the add-on if I press n
26.24 -> Go down to the shader library
27.76 -> So for those of you who don't know the shader library is just a simple add-on that will add a shader
33.44 -> So if you want to download this it is a free blender add-on
35.76 -> There will be a link in the description to our blog go ahead and check that out
38.879 -> So this all worked fine in previous versions of blender?
41.84 -> But in version 2.9
43.44 -> We can see the stylized section no longer works and if we go down here to the info window if we just scroll the mouse
49.12 -> We can see this error code pops up.
51.12 -> So let's make a bit of space.
52.78 -> Let's read this error message. It's quite a big one
56.239 -> And then if we scroll through all of this don't worry about all of this text right now i'll explain what this means
61.039 -> It's not important
63.68 -> So, let's just scroll all the way up to the top here
66.32 -> So this is what your error message looks like
68.159 -> And by the way, it now has a red x which is a nice little addition to blender 2.9
72.799 -> So we can see right here. It says line 167
75.84 -> So if we had the script open, we'll be able to see where it is. So let's go ahead and do that
80 -> So you could just go to open and find the script
83.04 -> But what i'm going to do instead is go to one of these options here
86.88 -> I'm going to open up the search operator for me. It's spacebar, but for you, it could be f3
92.32 -> Then i'm just going to type edit source
95.2 -> And then click this and it'll open up the script for me
102.4 -> So now with this script open, I want to go to line 167
106.72 -> just scroll down
110.48 -> It actually displays the line of text here so we know it's a problem with something in this line of text
115.92 -> Then if we go down it says type error
118.64 -> Error with keyword argument icon so we know it's a problem with somewhere within this icon
123.92 -> So if we keep reading it says force underscore smoke flow not found in any of this list
130.399 -> And this is just a list of all the possible icons that you can use, so don't worry about all these
135.36 -> It's just saying that the force underscore smoke flow is no longer in this list. So that's all it is
140.239 -> It's just changed an icon so we can see over here force underscore smoke flow is no longer being used
147.04 -> so if we change this to say question
151.76 -> Since we know it's here
153.84 -> now if we run script
155.68 -> We can see these options are now being displayed. The only problem was the icon
159.84 -> So yeah, maybe icons have changed you need to go through your options and just make sure there is no errors there
164.879 -> It's definitely worthwhile checking your error code see what the problem is and see where you can fix it
169.2 -> We can see it's just a simple fix by changing the icon name in the future
172.72 -> It might be a little bit more complex
174.08 -> But by reading the error messages we can get a clear understanding of what the problem is
177.92 -> So I hope you found this quick video helpful. If you did hit the like button as always
181.76 -> Thanks for watching and i'll see you next time
Source: https://www.youtube.com/watch?v=Kgqmu1NgdvY