Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Obtaining HIT Id while creating HIT in Amazon Mturk using Boto

I'm working on a project in Amazon Mturk. Im using the Python Boto API .

The boto.connection.create_HIT() method returns an object of ResultSet from which I am trying to get the HIT Id . I also used Response Groups like 'HITDetail', HITAssignmentSummary' and 'HITQuestion' in the Create_HIT().

my_hit = mturk_connection.create_hit(hit_type = my_hit_type,
            question = my_question,
            max_assignments = 1,
            annotation = "An annotation from boto ",
            lifetime = 8*60, 
            response_groups = ['HITDetail','HITQuestion','HITAssignmentSummary'])

But I am not able to find a way to get the HIT Id from what it returns.

Please help me with this.

like image 449
Hisham Ibrahim Avatar asked Dec 21 '12 06:12

Hisham Ibrahim


1 Answers

In the create_HIT (), pass the value of the argument 'response_groups' as 'Minimal'. Then in your case, use the my_hit[0].HITTypeId It should work fine now.. :)

like image 139
Abhilash Joseph Avatar answered Sep 21 '22 03:09

Abhilash Joseph