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' )

Tired of AWS Console? Try Dynobase.

First 7 days are. No credit card needed.

Product Features

Download
/
Changelog
/
Pricing
/
Member Portal
/
Privacy
/
EULA
/
Twitter
© 2024 Dynobase
+
Better DynamoDB Experience.
Try Dynobase to accelerate your DynamoDB workflow. Start your 7-day free trial today.