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

Hi, OSError, but error msg is 'Is a directory '. Any suggestions? #27

Closed
kshamap opened this issue Oct 27, 2020 · 7 comments
Closed

Hi, OSError, but error msg is 'Is a directory '. Any suggestions? #27

kshamap opened this issue Oct 27, 2020 · 7 comments

Comments

@kshamap
Copy link

kshamap commented Oct 27, 2020

Hi, I am getting similar error , but error msg is 'Is a directory '. Any suggestions?

Traceback (most recent call last):
File "head_pose_estimation.py", line 131, in
landmark_model = get_landmark_model()
File "/root/Proctoring-AI/face_landmarks.py", line 31, in get_landmark_model
model = keras.models.load_model(saved_model)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/saving/hdf5_format.py", line 203, in load_model
f = h5py.File(filepath, mode='r')
File "/usr/local/lib/python3.6/dist-packages/h5py/_hl/files.py", line 408, in init
swmr=swmr)
File "/usr/local/lib/python3.6/dist-packages/h5py/_hl/files.py", line 173, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 88, in h5py.h5f.open
OSError: Unable to open file (file read failed: time = Tue Oct 27 12:16:21 2020
, filename = 'models/pose_model', file descriptor = 3, errno = 21, error message = 'Is a directory', buf = 0x7ffd0fa0e910, total read size = 8, bytes this sub-read = 8, bytes actually read = 18446744073709551615, offset = 0)

Name: numpy
Version: 1.19.2

Name:tensorflow
Version:2.0.0-alpha0

Originally posted by @kshamap in #10 (comment)

@vardanagarwal
Copy link
Owner

Hi, can you make sure you have a folder called models where the pose_model directory is placed. If it not there and you want to use a custom location then you pass it as a parameter in get_landmarks_model().

@kshamap
Copy link
Author

kshamap commented Oct 27, 2020

Hi , I do have pose_model directory in models folder.

@vardanagarwal
Copy link
Owner

I don't know then why it causing you this problem. I checked my Tensorflow version is 2.1.0 and the NumPy version is 1.19.1. Maybe you can update your TensorFlow version and it might work.

@vardanagarwal
Copy link
Owner

Have a look at the answer to this Stack Overflow question on your issue. Maybe putting the pose_model in the working directory and passing get_landmarks_model("pose_model") might work for you.

@kshamap
Copy link
Author

kshamap commented Oct 27, 2020

Hey , Yay fixed it .

Upgraded tensorflow from Version:2.0.0-alpha0 to 2.0.0-beta1.

Thanks for your fast replies.

@pranav-x
Copy link

Hey , Yay fixed it .

Upgraded tensorflow from Version:2.0.0-alpha0 to 2.0.0-beta1.

Thanks for your fast replies.

Hey i have upgraded tf version but i am still getting this error.

@vardanagarwal
Copy link
Owner

Pls try TensorFlow 2.2

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

3 participants