KamitaniLab / GenericObjectDecoding

Demo code for Horikawa and Kamitani (2017) Generic decoding of seen and imagined objects using hierarchical visual features. Nat Commun https://www.nature.com/articles/ncomms15037.
150 stars 46 forks source link

AttributeError: 'Dataset' object has no attribute 'value' #19

Closed szm-R closed 4 years ago

szm-R commented 4 years ago

Hi,

Following the instruction in the ReadMe file, I downloaded the .h5 files from figshare and put in the "data" directory in code/python and then tried to run the analysis_FeaturePrediction.py script. This is what it gives me:

Loading data Traceback (most recent call last):   File "C:/PhD/Courses/Biosignal processing/Project/PythonProject/analysis_FeaturePrediction.py", line 306, in     main()   File "C:/PhD/Courses/Biosignal processing/Project/PythonProject/analysis_FeaturePrediction.py", line 67, in main     data_all[sbj] = bdpy.BData(subjects[sbj][0])   File "C:\PhD\Courses\Biosignal processing\Project\PythonProject\venv\lib\site-packages\bdpy\bdata\bdata.py", line 79, in init     self.load(file_name, file_type)   File "C:\PhD\Courses\Biosignal processing\Project\PythonProject\venv\lib\site-packages\bdpy\bdata\bdata.py", line 708, in load     self.load_h5(load_filename)   File "C:\PhD\Courses\Biosignal processing\Project\PythonProject\venv\lib\site-packages\bdpy\bdata\bdata.py", line 874, in load_h5     if isinstance(v.value, np.ndarray): AttributeError: 'Dataset' object has no attribute 'value'

Process finished with exit code 1

I tried to debug the code but couldn't get much out of it and would appreciate any help greatly.

Thank you.

szm-R commented 4 years ago

I downloaded the .h5 files again and it worked! I don't know what was wrong with the previous downloads...