dynobase-icon
Dynobase

Error: dynamodb cannot pickle '\_thread.lock' object

Rafal Wilinski

Answered by Rafal Wilinski

What's Causing This Error

You may run into this error when executing the batch_get_item operation using the syntax below.

response = dynamodb.meta.client.batch_get_item( RequestItems={ dynamodb.Table("table_name"): { 'Keys': [ {'id': id} for id in temp ], 'ConsistentRead': True } }, ReturnConsumedCapacity='TOTAL' )

Solution: Here's How To Resolve It

To solve this error, re-write your batch_get_item operation using the syntax below.

response = dynamodb.meta.client.batch_get_item( RequestItems={ 'table_name': { 'Keys': [ {'id': id} for id in temp ], 'ConsistentRead': True } }, ReturnConsumedCapacity='TOTAL' )

Dynobase is a Professional GUI Client for DynamoDB

Try 7-day free trial. No strings attached.

Product Features

Download
/
Changelog
/
Pricing
/
Member Portal
/
Privacy
/
EULA
/
Twitter
© 2024 Dynobase
+
Still using AWS DynamoDB Console?
Try Dynobase to accelerate your DynamoDB workflow. Start your 7-day free trial today.