poke1024 / origami

A suite of batches and tools for OCR tasks.
71 stars 15 forks source link

h5py encoding problem with pretrained models #18

Open bertsky opened 2 years ago

bertsky commented 2 years ago

In a fresh installation with the current software ecosystem, I end up with the well-known issue

AttributeError: 'str' object has no attribute 'decode'

when loading the models. Essentially, older Keras/Tensorflow models cannot be loaded by h5py>2.10 (but are nevertheless dependent on that). Add pip's stupidity, and you can at least downgrade h5py manually, if that requirement comes last in the chain. But there's an additional glitch because h5py 2.1 does not compile with more recent Numpy anymore.

EDIT: confused 2.10 with 2.1, sry

Zathiron commented 2 years ago

where you able to solve the issue? I am having the same problem and can't solve even if I have the correct versions. Nevermind was solved using conda install 'h5py==2.10.0' in the anaconda env.