文字列のハッシュキーと範囲キーで設定されたDynamoDBデータベースがあります。これは動作します:table.queryでattributes_to_getを使用したときのBoto DynamoDBエラー
>>> x = table.query(hash_key='[email protected]', range_key_condition=BEGINS_WITH("20"),
request_limit=5)
>>> [i for i in x]
[{u'x-entry-page': ...
これは、と私はなぜ理解することはできませんしません:
は>>> x = table.query(hash_key='[email protected]', range_key_condition=BEGINS_WITH("20"),
attributes_to_get=[u'x-start-time'], request_limit=5)
>>> [i for i in x]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/boto-2.3.0-py2.7.egg/boto/dynamodb/layer2.py", line 588, in query
yield item_class(table, attrs=item)
File "/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/boto-2.3.0-py2.7.egg/boto/dynamodb/item.py", line 45, in __init__
raise DynamoDBItemError('You must supply a hash_key')
boto.dynamodb.exceptions.DynamoDBItemError: BotoClientError: You must supply a hash_key
これは私には非常にほとんど意味がありません。私は明らかにハッシュキーを供給しています。 Botoのソースを見るだけでは問題が何であるかはわかりません。問題の属性はすべてのレコードに確実に存在します(エラーを送出するものではありません)。
提案がありますか?ありがとう!
、[問題を修正しました3時間前](https://github.com/boto/boto/issues/656)! – Harlan