allensdk pkl file
@nicain @wbwakeman Hi; I am trying the allensdk code for finding the pkl file: api = behavior_ophys_api.BehaviorOphysLimsApi(lims_data['experiment_id'][0]) stimulus_pkl_path = api.get_behavior_stimulus_file()
the code above fails (see below for the error). But there are 2 pkl files in /allen/programs/braintv/production/neuralcoding/prod0/specimen_738720433/ophys_session_786144371/
Why is allensdk not able to find the pkl file? Thanks.
Error:
File "/home/farzaneh/Documents/analysis_codes/visual_behavior_analysis/visual_behavior/ophys/io/convert_level_1_to_level_2.py", line 383, in get_stimulus_pkl_path stimulus_pkl_path = api.get_behavior_stimulus_file()
File "/home/farzaneh/anaconda2/envs/visbeh/lib/python3.6/site-packages/allensdk/api/cache.py", line 59, in wrapper memodict[key] = f(*args, **kwargs)
File "/home/farzaneh/anaconda2/envs/visbeh/lib/python3.6/site-packages/allensdk/internal/api/behavior_ophys_api.py", line 72, in get_behavior_stimulus_file return self.fetchone(query, strict=True)
File "/home/farzaneh/anaconda2/envs/visbeh/lib/python3.6/site-packages/allensdk/internal/api/init.py", line 41, in fetchone return one(one(cur.fetchall()))
File "/home/farzaneh/anaconda2/envs/visbeh/lib/python3.6/site-packages/allensdk/internal/api/init.py", line 14, in one raise OneResultExpectedError('Expected length one result, received: {} results form query'.format(x))
OneResultExpectedError: Expected length one result, received: [] results form query
@farznaj could you test this against the 1.3.0 release of the allensdk (or the current master) and see if it is still a problem? If so, we need to submit an issue to the SDK to figure out why lims can't find the pkl files for those sessions.