justheuristic / prefetch_generator

Simple package that makes your generator work in background thread
The Unlicense
272 stars 22 forks source link

Error when using older h5py and threading #1

Closed victorhcm closed 8 years ago

victorhcm commented 8 years ago

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.