question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: module 'h5py' has no attribute 'File'

See original GitHub issue

I am very interested in this project, because we have a cat that has prey for me sometimes three times a day. I have installed everything following your readme. A few missing were showed at the first runs but this import errors i solved. But now i have an issue where i can not find a solution:

I get this Traceback when running catCam_starter.sh.

Traceback (most recent call last): File "cascade.py", line 724, in <module> sq_cascade = Sequential_Cascade_Feeder() File "cascade.py", line 75, in __init__ self.base_cascade = Cascade() File "cascade.py", line 417, in __init__ self.pc_stage = PC_Stage() File "/home/pi/CatPreyAnalyzer/model_stages.py", line 269, in __init__ self.pc_model = tf.keras.models.load_model(os.path.join(PC_models_dir, self.pc_model_name)) File "/home/pi/.local/lib/python3.7/site-packages/tensorflow_core/python/keras/saving/save.py", line 145, in load_model isinstance(filepath, h5py.File) or h5py.is_hdf5(filepath))): AttributeError: module 'h5py' has no attribute 'File'

Do you have any idea why this happens?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
maschdecommented, Mar 20, 2021

Ich habe die Lösung in dem geschlossenen Issue von badsche gefunden und dort auch gesehen dass du deutschsprachig bist. Nach der Installation von sudo apt-get install python3-h5py läuft bisher alles einwandfrei. Wenn noch weitere Fehler oder Fragen auftauchen würde ich mich wieder melden.

0reactions
niciBumecommented, Mar 24, 2021

Hmm… Also auf meinem Pi habe ich tensorflow==1.14.0 So wie es aussieht liegt dein Problem gänzlich beim import von tensorflow. Um andere Fehlerquellen zu vermeiden würde ich mich auf dies konzentrieren. Also einfach nur: python3 und dann import tensorflow as tf direkt im terminal. Ich kriege dann folgende Warnung: 2021-03-24 20:56:35.443227: E tensorflow/core/platform/hadoop/hadoop_file_system.cc:132] HadoopFileSystem load error: libhdfs.so: cannot open shared object file: No such file or directory Aber danach läuft es…

Read more comments on GitHub >

github_iconTop Results From Across the Web

module 'h5py' has no attribute 'File' when trying to save a ...
Try this.Its working fine. from tensorflow.keras.models import load_model model.save("model.h5") print("Saved model to disk") # load model ...
Read more >
Module 'h5py' has no attribute 'FIle' - Fast.ai forums
I'm running lesson1.ipynb and when it does vgg = Vgg16(), the program return error: module 'h5py' has no attribute 'FIle'.
Read more >
Dataset slice reference - AttributeError: module 'h5py' has no ...
Dataset slice reference - AttributeError: module 'h5py' has no attribute ... File("sliceref.h5", 'w') as h5_store: # create 2 datasets ds1 ...
Read more >
module 'h5py' has no attribute 'File' - CSDN博客
今天在做吴恩达老师的深度学习作业时,出现了module 'h5py' has no attribute 'File'的错误。找了很多网上的解决方法,都不太适合自己。
Read more >
h5py - Bountysource
Dataset slice reference - AttributeError: module 'h5py' has no attribute ... I have an HDF5 file with "Run_0/Event_1" group that contains 176 "Traces_A....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found