How To Fix The 10 Most Common Python Errors
Here are the tip 10 errors you will encounter in Python, and also how you can fix them. Do let me know in the comments section below about your experience with errors, or if there are any in particular that you have some experience with!
▶ Become job-ready with Python:
www.indently.io
▶ Follow me on Instagram:
/ indentlyreels
00:00 Intro
00:28 AttributeError
01:20 AssertionError
02:05 ImportError
03:05 SyntaxError
04:26 TypeError
05:06 Break
05:19 IndexError
06:01 NameError
06:44 RecursionError
07:27 IndentationError
08:06 ValueError
09:10 Conclusion
Пікірлер: 23
Another problem beginners make is naming their Python file the same as a module they’re trying to import in the same file. For example, if a beginner was watching a YT video about the Python ‘math‘ module, they might name their file, “math.py” (as they follow along) then - inside - they “import math” at the top. Oops, that’s not going to work. 😟
@Indently
Жыл бұрын
That's absolutely true, I've made that one many times.
I think this video was well worth doing, thank you. It's a great quick reference
Thank you. This was very helpful.
thanks! i always get these errors and spend ages trying to fix them! first btw
Great video!
Thanks so much !
Wow! You just made my life easier 👏🏽
Thanks Sir
excellent video, my friend error handling helps with Python garbage collection
Thank you
What code editor are you using? I like it a lot!!
@Indently
Жыл бұрын
PyCharm + NewUI
@PlasmaUI
Жыл бұрын
@@Indently Thank you, appreciate it.
it does not throw an error but it just does not work. I forgot to put the parenthesis at the end of a function. and similarly forgot to call the main() and could not understand why it did not work.
one annoying error is that, you can not indent your code with both spaces and tab(s) you must either use spaces or tab , if you mix them , you have to make them uniform. and you may not know that which one is less than the other , and that could be annoying
what about a TypeError: ‘ NoneType’ object is not subscriptable?
i want more detailed info abt the ValueError in python , Please............................
What python complier is this am a beginner in python coding
@ttrev007
6 ай бұрын
python does not use a compiler. "For Python, it relies on the application interpreter"
@suraruth8528
5 ай бұрын
It's a Interpreter........ Also compiler ........
Love the way you explain errors however; and likely because I'm have never 'coded' anything before, anyways, I have a 'typeError' code and you do mention this which is awesome. The big but now; I'm trying to run' an open source program with python and I believe that I was close to having the program 'run' when this typeError was displayed; The error displays as TypeError: __class__ set to defining CSTR as and I have no idea either what it means or how to remedy the error. I don't understand how to repair said error so I am reaching for guidance. If you, any any of your followers can help me resolve this it will be deeply appreciated. Thank you either way----