Skip to content
Advertisement

Json.loads error on reading mutiple json files from s3 bucket

when I am passing manually json file as key to load in python shell then its working fine. code below

JavaScript

However when using for loop to read JSON object from s3 bucket, then I am getting the error

JavaScript

Advertisement

Answer

Some of the entries in bucket.objects don’t have any JSON in the data, so check for that and skip them.

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement