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

TypeError: argument of type 'NoneType' is not iterable #6

Open
babu-s23 opened this issue Oct 14, 2022 · 2 comments
Open

TypeError: argument of type 'NoneType' is not iterable #6

babu-s23 opened this issue Oct 14, 2022 · 2 comments

Comments

@babu-s23
Copy link

Traceback (most recent call last): File "reviews.py", line 50, in <module> if 'Verified Purchase' in r['verified']: TypeError: argument of type 'NoneType' is not iterable

@aaqib-ahmed-nazir
Copy link

did you find any fix?, I am getting the same issue

@aaqib-ahmed-nazir
Copy link

aaqib-ahmed-nazir commented Nov 16, 2024

here's the fix:

   if 'verified' in r and r['verified'] is not None:
                    if 'Verified Purchase' in r['verified']:
                        r['verified'] = 'Yes'
                    else:
                        r['verified'] = 'Yes'
   else:
         r['verified'] = 'No'

just add an else condition after if and it works fine

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

2 participants