Python中文
首页
教程
问答
标签
搜索
登录
注册
python主文件中的IndentationError
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我是python的新手,当我在sublimetext2上执行helloworld代码时,我遇到了这个错误</p> <pre><code> Traceback (most recent call last): File "G:\Python32\lib\runpy.py", line 142, in _run_module_as_main mod_name, loader, code, fname = _get_main_module_details() File "G:\Python32\lib\runpy.py", line 185, in _get_main_module_details return _get_module_details(main_name) File "G:\Python32\lib\runpy.py", line 114, in _get_module_details code = loader.get_code(mod_name) File "G:\Python32\lib\pkgutil.py", line 281, in get_code self.code = compile(source, self.filename, 'exec') File "G:\Python32\__main__.py", line 2 | ^ IndentationError: unexpected indent [Finished in 0.1s with exit code 1] </code></pre> <p>请帮帮我</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>缩进是Python对语句分组的方式。每行都有一个缩进的空格。 当以交互方式输入一个复合语句时,它后面必须跟一个空行来表示完成(因为解析器无法猜测您何时键入了最后一行)。请注意,基本块中的每一行必须缩进相同的量。在</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
如何修复设置.py尝试构建Visual Studio代码python解决方案时出错
9 回答
如何修复设置为检查哪些数字是素数的代码?
1 回答
如何修复设置的环境变量GDAL_DATA路径?
3 回答
如何修复访问“DJANGO_DEBUG”变量时的KeyError
8 回答
如何修复访问API时的“无效身份验证凭据”错误
7 回答
如何修复识别器。听着()在python中用于语音识别
9 回答
如何修复试图读取excel文件时被拒绝的[Errno13]权限?
4 回答
如何修复该函数,使生成的数据帧只包含子集列?
8 回答
如何修复语句弃用警告
3 回答
如何修复语法错误:不能在elemen上使用绝对路径
6 回答
如何修复语法错误:不能在Python上赋值给literal
1 回答
如何修复语法错误:无效语法?
10 回答
如何修复语法错误:无法分配给li
4 回答
如何修复语音识别器python3中的“权限错误:[Errno 13]”
2 回答
如何修复语音频道连接上的添加角色
6 回答
如何修复请求(urllib3)与app engine一起工作?
6 回答
如何修复请求中的“TypeError:'dict'object is not callable”(TypeError:'dict'对象不可调用)
4 回答
如何修复请求中的“启用javascript”错误?
9 回答
如何修复读取csv fi时的非法换行值
1 回答
如何修复读取JSON-fi时“list”对象没有属性“values”
1 回答