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 ...
随机推荐
- redirection in linux
2>&1 # Redirects stderr to stdout. # Error messages get sent to same place as standard output ...
- Spring学习之旅(三)Spring工作原理初探
详细的废话相信很多书籍视频资料都已经很多了,这里说几个小编个人认为对于理解Spring框架很重要的点.欢迎批评指正. 1)Spring的控制反转 先说说“依赖”,在面向对象程序设计中,类A中用到了类B ...
- Android图片采样缩放
为什么要对Android中的图片进行采样缩放呢? 是为了更加高效的加载Bitmap.假设通过imageView来显示图片,很多时候ImageView并没有图片的原始尺寸那么大,这时候把整张图片加载进来 ...
- <自动化测试方案_2>第二章、自动化测试是什么?(What)
第二章.自动化测试是什么?(What) 自动化测试是相对于手工测试而言:通过脚本自动去执行测试用例,从而代替人完成测试工作. 自动化测试相对手工测试优缺点 测试方式 优点 缺点 手工测试 1,完整的对 ...
- (网页)angularJs中怎么模拟jQuery中的this?(转)
转载自mini_fan博客园: 今天想在Angular项目中使用jQuery的this功能,发现undefined.代码如下: HTML部分: <p ng-click="testCli ...
- [20181116]18c DML 日志优化.txt
[20181116]18c DML 日志优化.txt 1.环境:xxxxxxxx> select banner_full from v$version;BANNER_FULL---------- ...
- sql server 分组,取每组的前几行数据
sql中group by后,获取每组中的前N行数据,目前我知道的有2种方法 比如有个成绩表: 里面有字段学生ID,科目,成绩.我现在想取每个科目的头三名. 1. 子查询 select * from ...
- js 3d图形
使用Three.js在网上中进行3D图形的展示 Three.js的官网https://threejs.org/ 第一个Demo,生成一个旋转的正方体 <style> canvas { wi ...
- 转:RowVersion 用法
在数据表更新时,如何表征每个数据行更新时间的先后顺序?最简单的做法是使用RowVersion(行版本)字段,它和时间戳(TimeStamp)类型的功能相似,只不过TimeStamp 已过时,应避免用于 ...
- emacs 配置.emacs
emacs 配置.emacs (require 'package) (package-initialize) (add-to-list'package-archives '("melpa&q ...