boto3 mturk send_bonus error… here is a solution to the problem.
boto3 mturk send_bonus error
When I try to send a bonus through Boto3 regularly (but not always), 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 as follows:
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 upper limit to the amount of money that can be sent as a bonus per day. I did it in a sandbox, so it’s definitely not a matter of insufficient funding. Has anyone else had a similar problem?
Update: I found the source of the error: mTurk doesn’t allow sending more than $100 per worker per day for some strange reason.
Solution
I found the source of the error: for some strange reason, mTurk doesn’t allow sending more than $100 per worker per day (at least for sandboxes – not tested with “real” endpoints).