我正在尝试将我创建的资格分配给使用boto2完成我的实验的Turkers。我有三批相同的实验(每组都有不同的HIT ID)。我很容易用以下代码将资格分配给第一批:
from boto.mturk.connection import MTurkConnection
mturk = MTurkConnection(aws_access_key_id=ACCESS_ID,
aws_secret_access_key=SECRET_KEY,
host=HOST)
qualificationID = 'qualificationIDString'
for worker_id in workerIDList:
# assign qualification
print("Granting qualification: %s to worker %s"%(globLoc_qualification, worker_id))
mturk.assign_qualification(qualification_type_id=qualificationID,
worker_id=worker_id)
然后我将HIT ID更改为第二批并重新运行相同的代码,但是随着时间的流逝,我收到了错误消息:
Granting qualification: 3HWVT555HSXFC1HZE98Y23F1CFJAI3 to worker: A1ZTSCPETU3UJW
MTurkRequestError: 200 OK
<?xml version="1.0"?>
<AssignQualificationResponse><OperationRequest><RequestId>ede118ea-9440-4a4d-8f9b-94b816c3a92f</RequestId></OperationRequest><AssignQualificationResult><Request><IsValid>False</IsValid><Errors><Error><Code>AWS.MechanicalTurk.QualificationAlreadyExists</Code><Message>The qualification already exists. (1531770857498)</Message></Error></Errors></Request></AssignQualificationResult></AssignQualificationResponse> A1ZTSCPETU3UJW
关于“资格已经存在”的任何提示是什么?
答案 0 :(得分:0)
错误是说您要授予QualificationType的Worker已经具有该Qualification 。您可能会看到这种情况,因为授予QualificationType是在Worker而不是HIT上发生的事情。工人是否可以具有资格。工人不能多次食用。
有关Qualifications和QualificationTypes的更多信息,请查看以下资源: