Python indentationerror:unindent does not match any outer indentation level issues
Use Python to make a homework, I first use the notepad++ edit, and then back to bed and then use Pycharm Edit, when I finished writing a function test run when the problem arises, is actually indentation problem, because the notepad++ line is used by the space, and Pycharm the indentation after the use of the tab, so indentation is a problem, looked for a very long time only to find such a thing, very annoying AH!!! Indentationerror:expected an indented block this is a similar mistake. Change the indentation to a unified tab or space to be OK ======================================= =============================
python syntaxerror:non-ascii character ' \xe8 ' in fileImport Mathif __name__ = = ' __main__ ': name1 = raw_input ("Please enter your number:") Print name1 complete error message is as follows: File "D:\python\pythons\src\ test.py ", line 20syntaxerror:non-ascii character ' \xe8 ' in file D:\python\pythons\src\test.py on line, but no encoding Declared; See http://www.python.org/peps/pep-0263.html For details missing encoding type declaration: No encoding declared modified as follows: A#encoding:utf-8import Mathif __name__ = = ' __main__ ': name1 = raw_input ("Please enter your number:") Print name1 red section for encoding declaration! The following declarations are available: #coding: utf-8: Can be replaced by ===============================================================================
runtimeerror:maximum recursion depth exceeded recursive depth errorOn the Internet, we found that Python's default recursion depth is very limited, probably more than 900, and when the recursion depth exceeds this value, an exception is thrown. The default Python has an available recursive depth limit to avoid exhausting the memory in the computer. On my computer, this is 1000. The solution is to manually set the recursive call depth in the following way:
Import Syssys.setrecursionlimit (#
Summary of Python_ problems