归因错误,为什么?

2024-10-01 09:20:52 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在编写一个程序来解决一个tetravex,我遇到了这个错误:

AttributeError: 'list' object has no attribute 'PlacementList'.

我尝试了我所知道的一切,但不知道为什么我会犯那个错误。你能告诉我我做错了什么吗?在

这是指向我的代码的pastebin链接:http://pastebin.com/d1WdbCUu


Tags: no代码程序object链接错误attributelist
1条回答
网友
1楼 · 发布于 2024-10-01 09:20:52

显然,当您试图获取列表的PlacementList属性时,就会发生这种情况。在

示例如下:

>>> a = []
>>> a.PlacementList
Traceback (most recent call last):
  File "<pyshell#49>", line 1, in <module>
    a.PlacementList
AttributeError: 'list' object has no attribute 'PlacementList'

只要找到发生类似情况的代码-您正在尝试获取对象的PlacementList属性,该属性可以是list类型。在

相关问题 更多 >