Skip to content

AttributeError: 'NoneType' object has no attribute 'ReadAsArray' #357

@sugizo

Description

@sugizo

environment
google colab

steps

!wget -c https://github.com/1adrianb/face-alignment/blob/master/test/assets/aflw-test.jpg
pip install -U face-alignment

code

import face_alignment
from skimage import io

#fa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, flip_input=False)
fa = face_alignment.FaceAlignment(face_alignment.LandmarksType.THREE_D, flip_input=False)

input = io.imread('aflw-test.jpg')
preds = fa.get_landmarks(input)

result

AttributeError                            Traceback (most recent call last)
[<ipython-input-8-98467b9f95a1>](https://localhost:8080/#) in <cell line: 6>()
      4 fa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, flip_input=False)
      5 
----> 6 input = io.imread('aflw-test.jpg')
      7 preds = fa.get_landmarks(input)

6 frames
[/usr/local/lib/python3.10/dist-packages/imageio/plugins/gdal.py](https://localhost:8080/#) in _get_data(self, index)
     66             if index != 0:
     67                 raise IndexError("Gdal file contains only one dataset")
---> 68             return self._ds.ReadAsArray(), self._get_meta_data(index)
     69 
     70         def _get_meta_data(self, index):

AttributeError: 'NoneType' object has no attribute 'ReadAsArray'

best regards

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