这是空格和Tab缩进混乱导致的 在Pycharm中的解决办法是,找到Edit->Convert Indents->To spaces
Inconsistent indentation错误在Pycharm中的解决办法
原文:https://www.cnblogs.com/cyx-b/p/13658655.html