1

Im trying to integrate DAX with Pynamodb(working on an existing pull request). While testing the batch write method from aws DAX sdk I'm facing the below issue. Any help is appreciated.

/.virtualenvs/PynamoDB/lib/python2.7/site-packages/amazondax/DaxClient.pyc in batch_write_item(self, **kwargs)
     98             Stubs.write_batchWriteItem_116217951_1(request, tube)
     99 
--> 100             result = self._decode_result('BatchWriteItem', request, Assemblers.batchWriteItem_116217951_1, tube)
    101             result = self._resolve_attribute_values(result, tube)
    102             return result

/.virtualenvs/PynamoDB/lib/python2.7/site-packages/amazondax/DaxClient.pyc in _decode_result(self, operation_name, request, assembler, tube)
    223         if status == DaxClient.SUCCESS:
    224             tube.skip() #  Throw away the empty error header
--> 225             return assembler(request, tube)
    226         else:
    227             return self._handle_error(operation_name, tube)

/.virtualenvs/PynamoDB/lib/python2.7/site-packages/amazondax/Assemblers.pyc in batchWriteItem_116217951_1(request, tube)
    115 
    116         for _ in range(num_items, 0, -2):
--> 117             key = AttributeValueDecoder._decode_key_bytes(_dec, key_schema)
    118             if _dec.try_decode_null():
    119                 # DeleteRequest

UnboundLocalError: local variable 'key_schema' referenced before assignment
4

1 回答 1

1

This is a known issue that I hope to have a fix out for shortly.

This is fixed in version 1.0.4 of the DAX Python client.

于 2018-05-03T14:57:19.920 回答