From 278b228b2f79123e1d36523763acb5205a2b1278 Mon Sep 17 00:00:00 2001 From: maloneytc Date: Thu, 27 Jan 2022 16:26:47 -0500 Subject: [PATCH] Update PYTHON.md In line 140, files is a dictionary that cannot be looped over. Instead you must call files.items() to get a list of the key, value pairs to map onto the variables id and data. --- example/PYTHON.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/PYTHON.md b/example/PYTHON.md index 50a1b51..77c4a95 100644 --- a/example/PYTHON.md +++ b/example/PYTHON.md @@ -137,7 +137,7 @@ for url in results: files[url['package_file_id']]['download'] = url['downloadURL'] # Iterate on file id and it's data to perform the downloads. -for id, data in files: +for id, data in files.items(): name = data['name'] downloadUrl = data['download'] # Create a downloads directory @@ -159,4 +159,4 @@ Endpoints used in this example: - [Authentication](../endpoints/AUTHENTICATION.md) - [Get Package Files](../endpoints/GET_PACKAGE_FILES.md) - [Batch Generate Presigned URLS](../endpoints/BATCH_GENERATE_PRESIGNED_URLS.md) -- [Get Package Files from S3 Link](../endpoints/GET_PACKAGE_FILES_FROM_S3.md) \ No newline at end of file +- [Get Package Files from S3 Link](../endpoints/GET_PACKAGE_FILES_FROM_S3.md)