mercredi 19 septembre 2018

Nil Error using Ruby with Amazon Mechanical Turk in Production vs Development

I keep getting this error

property_links.rb:43:in `<main>': undefined method `each' for main:Object (NoMethodError)

when I run this ruby code using Amazon Mechanical Turk. The code was working in development returning no errors. The only thing I have changed is the last line to reflect production servers over sandbox.

properties..each do |property|
    result = @mturk.createHIT(:Title => title,
                              :Description => description,
                              :MaxAssignments => numAssignments,
                              :Reward => { :Amount => rewardAmount, :CurrencyCode => 'USD' },
                              :Keywords => keywords,
                              :HITLayoutId => LayoutID,
                              :HITLayoutParameter => [
                              {:Name => 'gis_code', :Value => properties},
                              ]
                              )
                              puts "Url: https://mturk.com/mturk/preview?groupId=#{result[:HITTypeId]}"

end

I've tried

Aucun commentaire:

Enregistrer un commentaire