1 indentationerror:expected an indented block
The Python language is a language that is very sensitive to indentation, confusing to many beginners, and even a very experienced Python programmer can be caught in a trap. The most common scenario is that the mix of tab and space results in an error, or indentation is incorrect, which is not possible with the naked eye.
This error will occur at compile time indentationerror:expected an indented block indicates that indentation is required here, as long as you press space or tab (but not mix) to indent the line in the wrong line.
Sentence: The next line with a colon tends to be indented, and the indentation is indented
2 Typeerror:can ' t multiply sequence by non-int of type ' list '
Data type input Error
3 Syntaxerror:invalid syntax
"Illegal statement". Missing punctuation marks (such as missing semicolons, missing & numbers), punctuation, spelling mistakes, and so on can all cause this error.
4 Runtimeerror:maximum recursion depth exceeded
Python's default recursion depth is limited, about 998 times, and throws an exception when the recursion depth exceeds this value.
The solution is to manually set the recursive call depth in the following way:
import
sys
sys.setrecursionlimit(
1500
)
# set the maximum depth as 1500
5
This article is from the "Squirrel" blog, please be sure to keep this source http://apinetree.blog.51cto.com/714152/1652316
Python compilation Error Collection