0

I am trying to annotate something to my HIT, namely, an AppleID:

>>> hit = conn.create_hit(
                    question=q,
                    reward = 0.05,
                    max_assignments=3,
                    title='Question',
                    annotation='apple_id=123456789'
             )

How would I then view the annotation. I am trying the following, but it is not showing there:

>>> hit[0]
<boto.mturk.connection.HIT object at 0x10d311050>
>>> hit[0].__dict__
{
    'IsValid': u'True',
    'HIT': '',
    'Request': '', 
    'HITId': u'3ZFRE2BDQ9EC3501ZSVWGUVL0EUXZT', 
    'HITTypeId': u'3I39O3TFTUXGEG283QLYWHJW0ZEJ8V'
}

How would I grab the annotation field?

David542
  • 104,438
  • 178
  • 489
  • 842

1 Answers1

0

You need to explicitly specify the response groups here to get the necessary data back -- http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_CommonParametersArticle.html#response-groups.

In this case, you need to include the response group HITDetail. Then:

>>> hit = conn.create_hit(
                question=q,
                reward = 0.05,
                max_assignments=3,
                title='Question',
                annotation = 'This is my annotATION!',
                response_groups=['Minimal', 'HITDetail']
             )
>>> annotation = create_hit_rs[0].RequesterAnnotation
>>> annotation
'This is my annotATION!'
David542
  • 104,438
  • 178
  • 489
  • 842