标题中提到了我的错误。从命令提示符调用代码时。同时在代码后面附加错误路径。我使用的是python3.5.3版本。导入NLTK库时发现错误。在
命令:
Python主测试.py在
代码:
# file name Maintest.py
import sys
#import nltk #on commenting the code runs fine
an_error = IndexError('tuple index out of range')
print(an_error)
def demorun():
print("Demo code called")
def main(argv):
print("Run the demo ")
demorun()
if __name__ == '__main__':
main(sys.argv)
错误:
^{pr2}$
目前没有回答
相关问题 更多 >
编程相关推荐