2019-02-14
阅读量:
573
AttributeError对象属性错误
报错:
>>> import sys
>>> sys.Path
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Path'
原因:
sys模块没有Path属性。
解决方案:
python对大小写敏感,Path和path代表不同的变量。将Path改为path即可。
>>> sys.path
['', '/usr/lib/python2.6/site-packages']






评论(0)


暂无数据