Python之TabError: inconsistent use of tabs and spaces in indentation和ModuleNotFoundError:No module named 'win32api'
1.TabError: inconsistent use of tabs and spaces in indentation
这是我的代码,感觉没啥不对,

后来运行之后出现了下面的错误,我也是弄了好久才弄好这个bug。
.
这个一般是由于你用编译器写代码时的Tab符和空格符混用引起的。对于Notepade++来说,只要你设置“显示空格和制表符”就行。
1.点击如下按钮:

2.手动设置:
View->Show Symbl->Show All Characters
下面是设置之后我的代码,这样就很容易看出来我的代码哪里有问题:

2.ModuleNotFoundError:No module named 'win32api'
真是令人烦躁,解决了这个问题之后,又出现了如下问题:

解决这个问题的办法如下:打开命令行,安装pypiwin32

Python之TabError: inconsistent use of tabs and spaces in indentation和ModuleNotFoundError:No module named 'win32api'的更多相关文章
- [bug] Python:“TabError: inconsistent use of tabs and spaces in indentation”
原因 代码中混用了Tab和4个空格 参考 https://blog.csdn.net/dongdong9223/article/details/82745068
- python 报错 TabError: inconsistent use of tabs and spaces in indentation
写python的时候如果出现如题的错误 TabError: inconsistent use of tabs and spaces in indentation 意为:制表符错误:缩进中制表符和空格使 ...
- Python文件运行时报TabError: inconsistent use of tabs and spaces in indentation
1. 问题描述 Python文件运行时报TabError: inconsistent use of tabs and spaces in indentation 2. 问题原因 tab 和 space ...
- Python使用4个空格替换Tab, TabError: inconsistent use of tabs and spaces in indentation。
问题:以前使用Pycharm和VsCode没遇到问题,使用nodepat++老是提示Tab异常 TabError: inconsistent use of tabs and spaces in in ...
- python运行错误---TabError: Inconsistent use of tabs and spaces in indentation
本文转载于:http://blog.csdn.net/sinat_36384705/article/details/71155379 首先这个错误的意思是:在缩进的时候,使用了错误的空格和tab 我使 ...
- Python程序调试-TabError: inconsistent use of tabs and spaces in indentation
报错信息:TabError: inconsistent use of tabs and spaces in indentation 说明:代码缩进统一使用Tab键或空格键,不能混用. 解决办法: 1. ...
- python错误提示“TabError: inconsistent use of tabs and spaces in indentation”
在遍历打印10以内的奇数是出现“TabError: inconsistent use of tabs and spaces in indentation”的错误提示: 代码如下: 第一感觉没什么错误, ...
- vscode 遇到 TabError: inconsistent use of tabs and spaces in indentation
Python开发,全靠缩进来控制Scope.缩进搞错了,代码也就有问题了.所以写着代码的时候,总是会遇到一个非常常见的问题.TabError: inconsistent use of tabs and ...
- PyCharm出现TabError: inconsistent use of tabs and spaces in indentation最简单实用的解决办法
本文使用PyCharm的格式化代码功能解决TabError: inconsistent use of tabs and spaces in indentation. 当把代码从别处复制进来PyChar ...
随机推荐
- (4)Microsoft office Word 2013版本操作入门_插入图片及图片的排版
1.word中插入图片和文绕图 1.1插入图片 :点击[插入]-->[图片] 或者 [联机图片]从网上选择. 1.2文字环绕: [格式] --->点击[位置] .[自动换行] 进行图 ...
- python面向对象学习(七)单例
目录 1. 单例设计模式 单例设计模式的应用场景 2. __new__ 方法 3. Python 中的单例 只执行一次初始化工作 1. 单例设计模式 设计模式 设计模式 是 前人工作的总结和提炼,通常 ...
- D. GukiZ and Binary Operations(矩阵+二进制)
D. GukiZ and Binary Operations We all know that GukiZ often plays with arrays. Now he is thinking ...
- IntelliJ IDEA生成live template(代码模板)
IntelliJ IDEA生成live template(代码模板) 一.进入live template模板 快捷键:Ctrl+Shift+A进入Find Action,输入live template ...
- 递归 + OS模块
''' 递归调用 :一个函数,调用了自身,称为递归调用 递归函数:一个会调用自身的函数称为递归函数 凡是循环能干的事,递归都能干 ''' ''' 方式: 1.写出临界条件 2.找这一次和上一次的关系 ...
- 定时任务Crontab
0.基本概念 & 实现原理 定时任务基本概念: 调度器:负责管理Quartz应用运行时环境,用于调度定时任务. 定时任务:按照某种时间规则,被调度的任务. a.从有无状态来说,有以下两种: ...
- Javascript 对象 - 字符串对象
字符串对象 字符串对象是JavaScript中比较常见的一种基本数据类型,他封装了一个字符串,并且提供了相应的方法.例如连接字符串.取字符串.分割字符串等.JavaScript中字符串是不可变的,原始 ...
- Git 结合Git使用Bitbucket进行代码版本管理流程规范与实践
结合Git使用Bitbucket进行代码版本管理流程规范与实践 By:授客 QQ:1033553122 目录 目录 1 一. 测试环境 2 二. 新建项目 2 三. 新建公有版本库 3 四. ...
- filter帅选
var ages = [32, 33, 16, 40]; ages= ages.filter(function checkAdult(obj) {//obj表示数组中的每个元素 return obj ...
- Maven和Solr简单总结
一.1.Maven介绍 Maven是一个项目管理工具,Maven通过POM项目对象模型,对象项目进行管理,通过一个配置文件(xml文件)进行项目的管理.对象项目的声明周期中每个阶段进行管理(清理,编译 ...