ashnkumar / sketch-code

Keras model to generate HTML code from hand-drawn website mockups. Implements an image captioning architecture to drawn source images.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to open file

jackysinic opened this issue · comments

environment: centos7
python version:3.5.1
All packages in requirements.txt were installed without error.
And files in data/ & bin/ were downloaded.
run scripts :
python3 convert_single_image.py --png_path ../examples/drawn_example1.png --output_folder ./generated_html --model_json_file ../bin/model_json.json --model_weights_file ../bin/weights.h5

raise error below:
Traceback (most recent call last):
File "convert_single_image.py", line 53, in
main()
File "convert_single_image.py", line 49, in main
model_weights_path = model_weights_file)
File "/home/apps/git/sketch-code/src/classes/inference/Sampler.py", line 23, in init
self.model = self.load_model(model_json_path, model_weights_path)
File "/home/apps/git/sketch-code/src/classes/inference/Sampler.py", line 74, in load_model
loaded_model.load_weights(model_weights_path)
File "/root/.local/share/virtualenvs/sketch-code-_Pp_OLh1/lib/python3.5/site-packages/keras/engine/topology.py", line 2616, in load_weights
f = h5py.File(filepath, mode='r')
File "/root/.local/share/virtualenvs/sketch-code-_Pp_OLh1/lib/python3.5/site-packages/h5py/_hl/files.py", line 269, in init
fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr)
File "/root/.local/share/virtualenvs/sketch-code-_Pp_OLh1/lib/python3.5/site-packages/h5py/_hl/files.py", line 99, 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 78, in h5py.h5f.open
OSError: Unable to open file (truncated file: eof = 138280960, sblock->base_addr = 0, stored_eoa = 558939120)

commented

Have you solved the problem?