question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: 'NoneType' object is not iterable

See original GitHub issue

Describe the bug A crash

Provide version info python 3.6 opencv 4.1 master

Provide error message

 File "/home/user/anaconda3/envs/mmdet2/lib/python3.7/site-packages/vidstab/VidStab.py", line 516, in stabilize
   output_fourcc=output_fourcc, progress_bar=bar)
 File "/home/user/anaconda3/envs/mmdet2/lib/python3.7/site-packages/vidstab/VidStab.py", line 214, in _apply_transforms
   self._gen_next_raw_transform()
 File "/home/user/anaconda3/envs/mmdet2/lib/python3.7/site-packages/vidstab/VidStab.py", line 116, in _gen_next_raw_transform
   matched_keypoints = vidstab_utils.match_keypoints(optical_flow, self.prev_kps)
 File "/home/user/anaconda3/envs/mmdet2/lib/python3.7/site-packages/vidstab/vidstab_utils.py", line 70, in match_keypoints
   for i, matched in enumerate(status):
TypeError: 'NoneType' object is not iterable

Provide code snippet

if not os.path.exists(folder_out):
    os.makedirs(folder_out)

for name in os.listdir(folder):
    path_in = os.path.join(folder, name)
    path_out = os.path.join(folder_out, name)
    assert os.path.exists(path_in)
    stabilizer = VidStab()
    stabilizer.stabilize(input_path=path_in, output_path=path_out,
                         #playback=True,
                         show_progress=True,
                         output_fourcc='mp4v'
                         )

Are you able to provide the video? I able if you need, just mention about it


Edited by @AdamSpannbauer for some formatting stuff.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
AdamSpannbauercommented, Jan 18, 2020

Merging #100 should fix the issue. @korabelnikov I essentially added your proposed changes. Thanks for reporting the issue and proposing the changes.

1reaction
korabelnikovcommented, Jan 9, 2020

I’ve sent a video via email

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: 'NoneType' object is not iterable in Python
It means that the data variable is passing None (which is type NoneType), its equivalent for nothing. So ...
Read more >
Python TypeError: 'NoneType' object is not iterable Solution | CK
The TypeError: 'NoneType' object is not iterable error is raised when you try to iterate over an object whose value is equal to...
Read more >
'nonetype' object is not iterable: How to solve this error in python
Typeerror: 'nonetype' object is not iterable: How to solve this error in python ... With Python, you can only iterate over an object...
Read more >
Solving python error - 'NoneType' object is not iterable
In the above example, if data is None , we will get the specified error on the second line where we are iterating...
Read more >
How to Fix TypeError: NoneType Object is not iterable
Are you looking to learn How to Fix TypeError : NoneType Object is not iterable ? This error occurs because you are trying...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found