gpt4 book ai didi

python - boto 连接到 Mturk 时出错

转载 作者:太空宇宙 更新时间:2023-11-03 19:09:43 26 4
gpt4 key购买 nike

我正在开发 boto 版本 2.6.0 。我在连接 mturk 时遇到问题。
我的代码是:

mturk_connection = MTurkConnection(aws_access_key_id=ACCESS_ID, aws_secret_access_key=SECRET_KEY, is_secure = True, host = HOST)
print mturk_connection.get_account_balance()

我收到的错误消息是:

boto.mturk.connection.MTurkRequestError: MTurkRequestError: 200 OK  
<?xml version="1.0"?>
<GetAccountBalanceResponse>

<OperationRequest>
<RequestId>06783745-3810-49d3-8235-d8a95f36b747</RequestId>
<Errors>
<Error>
<Code>AWS.BadClaimsSupplied</Code>
<Message>The specified claims are invalid. Based on your request, your signature should be generated using the following string: ActionGetAccountBalanceAWSAccessKeyIdAKIAQEQC5M72KQQSignatureVersion1Timestamp2012-11-15T06:10:07ZVersion2012-03-25. Check to make sure your system clock and timezone is not incorrect. Our current system time: 2012-11-15T06:10:07Z. (1352959808079 s)</Message>
<Data>
<Key>CustomerSignature</Key>
<Value>eMfIjDkM7v2/4fp4WqTOjtaFGDp1/Ydr2TTVV+oP5m0=</Value>
</Data><Data>
<Key>StringToSign</Key>
<Value>ActionGetAccountBalanceAWSAccessKeyIdAKIAJD3HEQEQC5M72KQQSignatureVersion1Timestamp2012-11-15T06:10:07ZVersion2012-03-25</Value>
</Data><Data>
<Key>SystemTime</Key>
<Value>2012-11-15T06:10:07Z</Value>
</Data>
</Error>
</Errors>
</OperationRequest>

</GetAccountBalanceResponse>

我尝试找出错误的根源,但失败了。请提出一些建议。

最佳答案

我猜您使用的是较旧版本的 boto,其中错误修复 #1057 尚未更新。请检查第 525 行是否有 'init' 方法。如果您没有找到 . . 从 github 重新克隆 boto 存储库再次并使用命令安装 -

python setup.py install

希望您的问题得到解决。

关于python - boto 连接到 Mturk 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13394605/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com