AttributeError: module 'h5py' has no attribute 'File'
See original GitHub issueI 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:
- Created 3 years ago
- Comments:5 (2 by maintainers)

Top Related StackOverflow Question
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-h5pyläuft bisher alles einwandfrei. Wenn noch weitere Fehler oder Fragen auftauchen würde ich mich wieder melden.Hmm… Also auf meinem Pi habe ich
tensorflow==1.14.0So 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:python3und dannimport tensorflow as tfdirekt 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 directoryAber danach läuft es…