简体   繁体   中英

boto3 mturk send_bonus error

When I try to send bonus via Boto3 regularly (but not always) the RequestError appears:

Exception Type: RequestError
Exception Value:    
An error occurred (RequestError) when calling the SendBonus operation: 
This user is not authorized to perform the requested operation.  
Exception Location: /Users/chapkovski/mynewotree/lib/python3.5/site-packages/botocore/client.py in _make_api_call, line 615

the code is the following:

response = client.send_bonus(
            WorkerId=self.WorkerId,
            BonusAmount=str(form.cleaned_data['bonus_amount']),
            AssignmentId=self.AssignmentId,
            Reason=form.cleaned_data['reason'],
        )

Since it works sometimes, it seems that there is a certain maximum amount that can be sent as a bonus per day. I do it in Sandbox so definitely it is not a problem of lack of funds. Anyone else has encountered the similar issue?

UPDATED: I've found the spurce of error: for some strange reasons mTurk doesn't allow to send more than $100 per day per worker.

我发现了错误的根源:由于一些奇怪的原因,mTurk不允许每个工人每天发送超过100美元(对于Sandbox来说至少是真的 - 没有使用'真实'端点进行测试)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM