Older h5py versions do not work with threading in Python. I was using h5py 2.2.1 and got the following error when trying to use either the decorator or instantiating the object:
AttributeError: 'thread._local' object has no attribute 'astype'
To solve this issue, upgrade h5py (pip install --upgrade h5py) to the newest version (it seems to be fixed in version 2.3). Also, make sure to remove python-h5py if it's an older version (sudo apt-get remove python-h5py) since it overshadows pip.
Older h5py versions do not work with
threading
in Python. I was using h5py 2.2.1 and got the following error when trying to use either the decorator or instantiating the object:To solve this issue, upgrade h5py (
pip install --upgrade h5py
) to the newest version (it seems to be fixed in version 2.3). Also, make sure to remove python-h5py if it's an older version (sudo apt-get remove python-h5py
) since it overshadows pip.