小编mr.*_*r.G的帖子

AttributeError:'NoneType'对象没有属性'endswith'

我目前正在开发一个更新网页的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'
Run Code Online (Sandbox Code Playgroud)

我不能通过任何代码,因为太长了.我想要了解的是错误的位置或代码的哪一部分触发了AttributeError.你能帮我么???

python attributeerror nonetype ends-with

11
推荐指数
1
解决办法
2万
查看次数

标签 统计

attributeerror ×1

ends-with ×1

nonetype ×1

python ×1