Skip to content

AttributeError: 'NoneType' object has no attribute 'shape' #35

@matiaspereyra777

Description

@matiaspereyra777

Hi!

Thank you for sharing this tool.
I was having this issue while running faced with an .mp4 video.

This is the terminal output:

Traceback (most recent call last):
  File "../bin/faced", line 143, in <module>
    run_video(path, t, args.save)
  File "../bin/faced", line 103, in run_video
    if frame.shape[0] == 0:
AttributeError: 'NoneType' object has no attribute 'shape'

The segment of the code that is pointing in faced is:

      ... 
      cap = cv2.VideoCapture(path)
       ...
       # Capture frame-by-frame
        ret, frame = cap.read()
        if frame.shape[0] == 0:
            break

Have you got any idea what can be happening here?
I am using a python3 conda enviroment, with tensorflow-gpu installed.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions