我正在尝试设置 Rturk 将一些工作外包给亚马逊的 Mechanical Turk。当我尝试创建我的HITs
时,我一直在控制台中遇到以下错误:
RestClient::BadRequest: 400 Bad Request
当我复制 URL 并将其粘贴到浏览器中以获取响应时,我收到以下消息:
This user is not authorized to perform the requested operation
你们知道这里会发生什么吗?我正在关注 github 上的 rturk 文档。https://github.com/mdp/rturk gem 是否有可能需要更新?
RTurk.setup(ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY_ID'], :sandbox => true)
hit = RTurk::Hit.create(
:title => "Sample turk",
:assignments_duration => 1.hour,
:expires_at => 1.day.from_now
) do |hit|
hit.lifetime = 1.day
hit.assignments = 1
hit.description = "Test description."
hit.keywords = "places, search, map, location"
hit.question(mturk-fb_path, :frame_height => 750)
hit.reward = reward
if approval_rate
hit.qualifications.add :approval_rate, { :gt => approval_rate }
end if abandoned_rate
hit.qualifications.add :abandoned_rate, { :lt => abandoned_rate }
end
if is_us
hit.qualifications.add :country, { :eql => "US" }
end
end
}