Skip to content

Commit

Permalink
make sure string gets passed to safe_system_path
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsf committed Apr 8, 2022
1 parent ee5a593 commit ec766ba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion allensdk/brain_observatory/sync_stim_aligner.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,12 @@ def get_start_frames_from_stimulus_blocks(
if not isinstance(stimulus_files, list):
stimulus_files = [stimulus_files, ]

safe_sync_path = safe_system_path(file_name=sync_file)
if isinstance(sync_file, pathlib.Path):
str_path = str(sync_file.resolve().absolute())
else:
str_path = sync_file
safe_sync_path = safe_system_path(file_name=str_path)

with sync_dataset.Dataset(safe_sync_path) as sync_data:
raw_frame_times = frame_time_fn(
data=sync_data,
Expand Down

0 comments on commit ec766ba

Please sign in to comment.