开发者

send notify email to worker

开发者 https://www.devze.com 2023-03-04 01:11 出处:网络
I\'m new to amazon mechanical turk. Currently, i\'m creating a google app to use amazon mechanical turk.

I'm new to amazon mechanical turk. Currently, i'm creating a google app to use amazon mechanical turk.

I try to send notify email to worker. But it doesn't successful.

This is my code:

dicts = {'WorkerId': self.worker_id, 'Subject': self.message_subject, 'MessageText': self.message_text}.

connection._process_request('NotifyWorkers', dicts)

connection was defined as below:

def Connection(variab开发者_如何学JAVAle):

  return MTurkConnection(

    aws_access_key_id = variable.aws_access_key_id

  , aws_secret_access_key = variable.aws_secret_access_key

  , host = variable.aws_hostname

  ).


This is the errors log:

#
I 2011-05-08 20:53:39.367

--------------code run form here------------

#
D 2011-05-08 20:53:39.381

using calc_signature_1

#
D 2011-05-08 20:53:39.381

Canonical: GET


Mon, 09 May 2011 03:53:39 GMT
/

#
D 2011-05-08 20:53:39.381

Method: GET

#
D 2011-05-08 20:53:39.382

Path: /?Action=NotifyWorkers&AWSAccessKeyId=AKIAJ6ZC7KOCL36JHNRA&MessageText=hi%20the%20linh1%20this%20is%20second%20mail.&SignatureVersion=1&Subject=email%202%20form%20mturk&Timestamp=2011-05-09T03%3A53%3A39&Version=2006-10-31&WorkerId=A253WARSJG1UGP&Signature=9b6oHHZIS87kbro/A1Qh88SWQX8%3D

#
D 2011-05-08 20:53:39.382

Data: 

#
D 2011-05-08 20:53:39.382

Headers: {'Date': 'Mon, 09 May 2011 03:53:39 GMT', 'Content-Length': '0', 'Authorization': u'AWS AKIAJ6ZC7KOCL36JHNRA:CgmpZWKboPnkis5iPjtYwI0cDGI=', 'User-Agent': 'Boto/1.9b (linux2)'}

#
D 2011-05-08 20:53:39.382

Host: None

#
D 2011-05-08 20:53:39.382

establishing HTTP connection.

I have set AWS hostname = mechanicalturk.sandbox.amazonaws.com

I'm using sandbox mode.

I still cannot send email to worker.

I have try to follow this app: https://github.com/johnjosephhorton/TurkAdmin or using this tool: https://turkadmin-jjh.appspot.com/

But it doesn't work.

So, please help me.

Thanks


It says Host: None in your logs.

My guess would be that variable.aws_hostname is actually empty.

0

精彩评论

暂无评论...
验证码 换一张
取 消