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 #3

Closed
darren-stoll opened this issue Oct 19, 2021 · 1 comment
Closed

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

darren-stoll opened this issue Oct 19, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@darren-stoll
Copy link

D:\Downloads\src-pbs-to-csv-main\src-pbs-to-csv-main>python src-pbs-to-csv.py doicm output.csv
Traceback (most recent call last):
  File "D:\Downloads\src-pbs-to-csv-main\src-pbs-to-csv-main\src-pbs-to-csv.py", line 102, in <module>
    runsdf['video'] = rawdf.apply(lambda x: getVideo(x['videos']), axis=1)
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pandas\core\frame.py", line 8740, in apply
    return op.apply()
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pandas\core\apply.py", line 688, in apply
    return self.apply_standard()
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pandas\core\apply.py", line 812, in apply_standard
    results, res_index = self.apply_series_generator()
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pandas\core\apply.py", line 828, in apply_series_generator
    results[i] = self.f(v)
  File "D:\Downloads\src-pbs-to-csv-main\src-pbs-to-csv-main\src-pbs-to-csv.py", line 102, in <lambda>
    runsdf['video'] = rawdf.apply(lambda x: getVideo(x['videos']), axis=1)
  File "D:\Downloads\src-pbs-to-csv-main\src-pbs-to-csv-main\src-pbs-to-csv.py", line 75, in getVideo
    if 'links' in x and len(x['links']) > 0:
TypeError: argument of type 'NoneType' is not iterable

I'm guessing that if no video is attached to the record, then the pull fails?

@baldnate
Copy link
Owner

Fixed, thanks for the report.

@baldnate baldnate added the bug Something isn't working label Oct 19, 2021
@baldnate baldnate self-assigned this Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants