Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allensdk pkl file #575

Open
farznaj opened this issue Jun 1, 2019 · 1 comment
Open

allensdk pkl file #575

farznaj opened this issue Jun 1, 2019 · 1 comment
Assignees

Comments

@farznaj
Copy link
Contributor

farznaj commented Jun 1, 2019

@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

@nickponvert
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants