我目前正在编写一个更新网页的 Python 脚本。但是运行主脚本会产生这个错误:
<res status='-1'><error message="'NoneType' object has no attribute 'endswith'"><![CDATA[
Traceback (most recent call last):
File "/path/to/file/ws_config.py", line XXXX, in Run
tests = TestList().tests
File "/path/to/file/ws_config.py", line XXXX, in __init__
UpdateTestGroup(None),
File "/path/to/file/ws_config.py", line XXXX, in __init__
test = CT.CurlTest(settings),
File "/path/to/file/config_tests.py", line XXXX, in __init__
self.params.path = os.path.join('/', os.path.join(params.dir, params.file))
File "/usr/lib/python2.6/posixpath.py", line 67, in join
elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'
我不能通过任何代码,因为太长了。我想了解的是错误所在的位置或代码的哪一部分触发了 AttributeError。你能帮我么???