我是python新手,我正在尝试在脚本下面运行。我没有发现这样的IO组错误。我特别提到过,如果那里没有任何物体,就不要进入。在
非常感谢任何帮助。在
错误:
T663xt
count value inside if loop T663xt
After appending ['T663xt']
AB12343
count value inside if loop AB12343
After appending ['T663xt', 'AB12343']
None
None
None
Traceback (most recent call last):
File "./KPHCcommandGenerator.py", line 55, in <module>
main()
File "./KPHCcommandGenerator.py", line 51, in main
F1.ParsingFile ( InputFile )
File "./KPHCcommandGenerator.py", line 38, in ParsingFile
print arrayTemp.group( count )
IndexError: no such group
源代码:
^{pr2}$正如我们看到的,我正在尝试迭代元组,我得到了形式正则表达式。我可能没有价值观。我只想给我的全局变量添加非None的值。在
首先,如果可能,删除或注释掉这个print语句,因为它在实际工作代码抛出错误之前抛出错误:
使用
^{pr2}$try/except
块捕获异常,并在超出组范围时妥善处理:相关问题 更多 >
编程相关推荐