IndentationError: unindent does not match any outer indentation level

后端 未结 30 2087
Happy的楠姐
Happy的楠姐 2020-11-21 07:48

When I compile the Python code below, I get

IndentationError: unindent does not match any outer indentation level




        
30条回答
  •  误落风尘
    2020-11-21 08:30

    For SPYDER users: I'm using spyder 3.3.2 with python 3.7.1 and I solved this, setting indentation to use tabs, with the following steps, click on:

    • Tools.
    • Preferences.
    • Editor.
    • Advanced settings.
    • Indentation characters -> Tabs.

    Then I reset the "unidented" line using tab key.

    For some reason, without this setting, I got the ghost IndentationError sometimes.

提交回复
热议问题