向工人发送通知邮件

时间:2011-05-09 04:40:42

标签: email amazon-web-services notify mechanicalturk

我是亚马逊机械土耳其人的新手。目前,我正在创建一个使用亚马逊机械土耳其人的谷歌应用程序。

我尝试向工作人员发送通知电子邮件。但它没有成功。

这是我的代码:

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(variable):

  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.

我已设置AWS hostname = mechanicalturk.sandbox.amazonaws.com

我正在使用沙盒模式。

我仍然无法向工作人员发送电子邮件。

我尝试关注此应用:https://github.com/johnjosephhorton/TurkAdmin或使用此工具:https://turkadmin-jjh.appspot.com/

但它不起作用。

所以,请帮助我。

由于

1 个答案:

答案 0 :(得分:0)

它在您的日志中显示Host: None

我的猜测是variable.aws_hostname实际上是空的。