python常见错误:IndentationError: unexpected indent
来源:互联网 发布:会员卡管理系统源码 编辑:程序博客网 时间:2024/05/17 19:21
作者:MyFuture24链接:http://www.jianshu.com/p/070a1e52fa6f來源:简书著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。【问题】
一个python脚本,本来都运行好好的,然后写了几行代码,而且也都确保每行都对齐了,但是运行的时候,却出现语法错误:
IndentationError: unexpected indent
【解决过程】
1.对于此错误,最常见的原因是,的确没有对齐。但是我根据错误提示的行数,去代码中看了下,没啥问题啊。
都是用TAB键,对齐好了的,没有不对齐的行数啊。
2.以为是前面的注释的内容影响后面的语句的语法了,所以把前面的注释也删除了。
结果还是此语法错误。
3.后来折腾了半天,突然想到了,把当前python脚本的所有字符都显示出来看看有没有啥特殊的字符。
当前用的文本编辑器Notepad++,好像有个设置,可以显示所有的字符的。
找到了,在:
视图 -> 显示符号 -> 显示空格与制表符
阅读全文
0 0
- python常见错误:IndentationError: unexpected indent
- python错误:IndentationError: unexpected indent
- Python错误IndentationError: unexpected indent
- Python常见的缩进错误IndentationError: unexpected indent
- Python编程错误之IndentationError: unexpected indent
- IndentationError: unexpected indent python
- IndentationError: unexpected indent python
- IndentationError: unexpected indent python
- IndentationError: unexpected indent python
- python:IndentationError: unexpected indent
- IndentationError: unexpected indent python
- IndentationError: unexpected indent python
- Python的IndentationError: unexpected indent
- python报"IndentationError: unexpected indent"
- Python编译时提示错误 IndentationError: unexpected indent
- python的IndentationError: unexpected indent python
- Python3之"IndentationError: unexpected indent"错误
- python报"IndentationError: unexpected indent"的解决方法.
- Your MATLAB license will expire in 05 days
- PROFILE
- Shadowsocks使用教程
- 它们才是真正的数学家 寻找自然界中的数学
- 2018年即将到来,大牛们已经开始关注的那些新的语言、框架和工具
- python常见错误:IndentationError: unexpected indent
- springboot学习笔记 --
- 常见的struts-xml 配置文件参数
- 输入一个一维数组,最大的与第一个元素交换,最小的与最后一个元素交换,输出数组。
- 面向AngularJS开发人员的21款实用工作流工具
- 升级到Android Studio3.0遇到的问题
- Spring事件源、事件监听和广播
- quartz.net 禁止并发执行
- hbase表操作命令