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

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

Open
sugizo opened this issue Feb 6, 2024 · 0 comments
Open

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

sugizo opened this issue Feb 6, 2024 · 0 comments

Comments

@sugizo
Copy link

sugizo commented Feb 6, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant