Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

batch_get() returns 'NoneType' object is not iterable #1093

Open
sachinsharmanykaa opened this issue Nov 2, 2022 · 0 comments
Open

batch_get() returns 'NoneType' object is not iterable #1093

sachinsharmanykaa opened this issue Nov 2, 2022 · 0 comments

Comments

@sachinsharmanykaa
Copy link

sachinsharmanykaa commented Nov 2, 2022

OBJECTIVE

The batch_get() function return 'NoneType' object is not iterable ERROR

for batch_item in page:

RCA
def _batch_get_page(cls, keys_to_get, consistent_read, attributes_to_get, settings: OperationSettings):
returns NONE, and assign NONE to
page, unprocessed_keys = cls._batch_get_page(
which ultimately fails to iterate on NONE. Results to raising 'NoneType' object is not iterable

SOLUTION

Update

for batch_item in page:

to
for batch_item in page or []:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant