You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I recently re-installed imgstore in a new conda environment, and I am now having issues running the get_extra_data() function. I get an error like this when I try to run it directly in Spyder, or indirectly via plot_interactive.py in a conda window:
(imgstore) C:\Users\vlcor\Desktop\imgstore\examples>python plot_interactive.py W:/Victoria/A69BLinearTrack/PuffCPA/puffcpatest_vglut6l_20220613_121106.17458173
Traceback (most recent call last):
File "plot_interactive.py", line 23, in
df = store.get_extra_data(ignore_corrupt_chunks=True)
File "C:\Users\vlcor.conda\envs\imgstore\lib\site-packages\imgstore\stores.py", line 455, in get_extra_data
dfs.append(motif_extra_data_h5_to_df(path))
File "C:\Users\vlcor.conda\envs\imgstore\lib\site-packages\imgstore\util.py", line 185, in motif_extra_data_h5_to_df
datasets = [s.strip() for s in f.attrs['datasets'].decode('ascii').split(',')]
AttributeError: 'str' object has no attribute 'decode'
I used to have no issues running this function in my previous version of imgstore, so I am pretty sure the code I'm using is okay... here's the snip I've been trying to run in Spyder:
from imgstore import new_for_filename
import imgstore
datafolder = r'W:\Victoria\A69BLinearTrack\PuffCPA\puffcpatest_vglut2_20220613_100607.17458173'
metapath = datafolder + '\metadata.yaml'
store = new_for_filename(metapath)
extradata = store.get_extra_data()
Any help would be very appreciated! Thanks!
The text was updated successfully, but these errors were encountered:
I think this is a python 3/2 issue and also possibly a change in how h5py represents strings. If possible, could you put one of the h5 files here (or email me), and also tell me your python version, and the h5py version
Now that you said that about the h5py version, I have some memory of this same issue occurring before, so sorry I didn't remember that! I think it ended up being a bug in h5py and I needed a different version.
I just tried pip uninstall h5py and then pip install versioned-hdf5 and ended up with h5py version 2.10.0 and now the imgstore function is working! So, problem solved thanks to you but I wanted to post a response anyway in case anyone else has the same issue.
Hi, I recently re-installed imgstore in a new conda environment, and I am now having issues running the get_extra_data() function. I get an error like this when I try to run it directly in Spyder, or indirectly via plot_interactive.py in a conda window:
(imgstore) C:\Users\vlcor\Desktop\imgstore\examples>python plot_interactive.py W:/Victoria/A69BLinearTrack/PuffCPA/puffcpatest_vglut6l_20220613_121106.17458173
Traceback (most recent call last):
File "plot_interactive.py", line 23, in
df = store.get_extra_data(ignore_corrupt_chunks=True)
File "C:\Users\vlcor.conda\envs\imgstore\lib\site-packages\imgstore\stores.py", line 455, in get_extra_data
dfs.append(motif_extra_data_h5_to_df(path))
File "C:\Users\vlcor.conda\envs\imgstore\lib\site-packages\imgstore\util.py", line 185, in motif_extra_data_h5_to_df
datasets = [s.strip() for s in f.attrs['datasets'].decode('ascii').split(',')]
AttributeError: 'str' object has no attribute 'decode'
I used to have no issues running this function in my previous version of imgstore, so I am pretty sure the code I'm using is okay... here's the snip I've been trying to run in Spyder:
from imgstore import new_for_filename
import imgstore
datafolder = r'W:\Victoria\A69BLinearTrack\PuffCPA\puffcpatest_vglut2_20220613_100607.17458173'
metapath = datafolder + '\metadata.yaml'
store = new_for_filename(metapath)
extradata = store.get_extra_data()
Any help would be very appreciated! Thanks!
The text was updated successfully, but these errors were encountered: