2gauravc / w_yrs_poc1

0 stars 0 forks source link

Error : 'NoneType' object is not subscriptable #2

Closed 2gauravc closed 3 years ago

2gauravc commented 3 years ago

Continuing analysis - data imputation...

Continuing analysis - data normalization...

Continuing analysis - identifying critical frames...

Traceback (most recent call last): File "trial_1_videos_final_output.py", line 505, in forehead_y_movement = [frame_height - x[1] for x in df_imputed[0]] File "trial_1_videos_final_output.py", line 505, in forehead_y_movement = [frame_height - x[1] for x in df_imputed[0]] TypeError: 'NoneType' object is not subscriptable

2gauravc commented 3 years ago

reference video: https://drive.google.com/file/d/1OGUeXbRROoUG-gTLHLyUbRthAtt-ZKQy/view?usp=sharing

prerak12agarwal commented 3 years ago

Able to replicate error - the issue arises when there are any None values in the column of body point 0 (ie. one or more frames in the video with the forehead being undetected).

Fixed the issue by adding error handling for None values.