Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/280.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 与Mturk的boto连接出错_Python_Python 2.7_Boto_Mechanicalturk - Fatal编程技术网

Python 与Mturk的boto连接出错

Python 与Mturk的boto连接出错,python,python-2.7,boto,mechanicalturk,Python,Python 2.7,Boto,Mechanicalturk,我正在开发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.M

我正在开发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,其中bug fix#1057尚未更新。请检查行号525以了解'init'方法。如果您没有找到。。再次从中重新克隆boto存储库,并使用以下命令进行安装-

python setup.py install

希望您的问题得到解决。

我猜您使用的是旧版本的boto,其中bug fix#1057尚未更新。请检查行号525以了解'init'方法。如果您找不到。。再次从中重新克隆boto存储库,并使用以下命令进行安装-

python setup.py install

希望您的问题得到解决。

我在“建议编辑”部分看到您的评论,该部分需要2k代表,您有25名代表,因此U R HAXR!谢谢你的更新。。如果你在“建议编辑”部分看到你的评论,需要2k rep,你有25个,因此你有一个答案!谢谢你的更新。。如果可以的话,找到一个答案