We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In working on #2601, found that several of the notebooks are not running. Some of these issues have already been reported.
The following notebooks failed with these errors:
INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/visual_behavior_ophys_data_access.ipynb INFO:papermill:Output Notebook: /tmp/tmpqwe4pf62/scratch_nb.ipynb /home/runner/.local/lib/python3.8/site-packages/nbformat/__init__.py:92: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. validate(nb) WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/61 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 2%|▏ | 1/61 [00:01<01:23, 1.39s/cell] Executing: 11%|█▏ | 7/61 [00:04<00:30, 1.79cell/s] Executing: 16%|█▋ | 10/61 [00:11<01:05, 1.29s/cell] Executing: 20%|█▉ | 12/61 [00:18<01:34, 1.93s/cell] Executing: 25%|██▍ | 15/61 [00:20<01:06, 1.45s/cell] Executing: 31%|███ | 19/61 [00:20<00:36, 1.16cell/s] Executing: 38%|███▊ | 23/61 [00:20<00:21, 1.80cell/s] Executing: 44%|████▍ | 27/61 [00:21<00:12, 2.66cell/s] Executing: 49%|████▉ | 30/61 [00:21<00:10, 2.96cell/s] Executing: 52%|█████▏ | 32/61 [00:22<00:09, 3.13cell/s] Executing: 57%|█████▋ | 35/61 [00:22<00:06, 4.27cell/s] Executing: 62%|██████▏ | 38/61 [00:22<00:04, 5.46cell/s] Executing: 67%|██████▋ | 41/61 [00:27<00:12, 1.56cell/s] Executing: 72%|███████▏ | 44/61 [00:28<00:09, 1.87cell/s] Executing: 74%|███████▍ | 45/61 [00:28<00:08, 1.94cell/s] Executing: 77%|███████▋ | 47/61 [00:43<00:31, 2.26s/cell] Executing: 77%|███████▋ | 47/61 [00:43<00:13, 1.07cell/s] ERROR:root: --------------------------------------------------------------------------- Exception encountered at "In [22]": --------------------------------------------------------------------------- KeyError Traceback (most recent call last) Cell In [22], line 1 ----> 1 ophys_experiment = cache.get_behavior_ophys_experiment(ophys_experiment_id=951980471) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/behavior_project_cache.py:324, in VisualBehaviorOphysProjectCache.get_behavior_ophys_experiment(self, ophys_experiment_id) 311 def get_behavior_ophys_experiment( 312 self, ophys_experiment_id: int 313 ) -> BehaviorOphysExperiment: 314 """ 315 Gets `BehaviorOphysExperiment` for `ophys_experiment_id` 316 Parameters (...) 322 BehaviorOphysExperiment 323 """ --> 324 return self.fetch_api.get_behavior_ophys_experiment( 325 ophys_experiment_id=ophys_experiment_id) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/project_apis/data_io/behavior_project_cloud_api.py:123, in BehaviorProjectCloudApi.get_behavior_ophys_experiment(self, ophys_experiment_id) 121 file_id = str(int(row[self.cache.file_id_column])) 122 data_path = self._get_data_path(file_id=file_id) --> 123 return BehaviorOphysExperiment.from_nwb_path( 124 str(data_path)) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_session.py:552, in BehaviorSession.from_nwb_path(cls, nwb_path, **kwargs) 550 with pynwb.NWBHDF5IO(nwb_path, 'r', load_namespaces=True) as read_io: 551 nwbfile = read_io.read() --> 552 return cls.from_nwb( 553 nwbfile=nwbfile, 554 **kwargs) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_ophys_experiment.py:237, in BehaviorOphysExperiment.from_nwb(cls, nwbfile, eye_tracking_z_threshold, eye_tracking_dilation_frames, events_filter_scale_seconds, events_filter_n_time_steps, exclude_invalid_rois) 235 behavior_session = BehaviorSession.from_nwb(nwbfile=nwbfile) 236 projections = Projections.from_nwb(nwbfile=nwbfile) --> 237 cell_specimens = CellSpecimens.from_nwb( 238 nwbfile=nwbfile, 239 segmentation_mask_image_spacing=projections.max_projection.spacing, 240 events_params=EventsParams( 241 filter_scale_seconds=events_filter_scale_seconds, 242 filter_n_time_steps=events_filter_n_time_steps 243 ), 244 exclude_invalid_rois=exclude_invalid_rois 245 ) 246 motion_correction = MotionCorrection.from_nwb(nwbfile=nwbfile) 247 is_multiplane_session = _is_multi_plane_session() File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/data_objects/cell_specimens/cell_specimens.py:611, in CellSpecimens.from_nwb(cls, nwbfile, segmentation_mask_image_spacing, events_params, exclude_invalid_rois) 609 meta = CellSpecimenMeta.from_nwb(nwbfile=nwbfile) 610 dff_traces = DFFTraces.from_nwb(nwbfile=nwbfile) --> 611 demixed_traces = DemixedTraces.from_nwb(nwbfile=nwbfile) 612 neuropil_traces = NeuropilTraces.from_nwb(nwbfile=nwbfile) 613 corrected_fluorescence_traces = CorrectedFluorescenceTraces.from_nwb( 614 nwbfile=nwbfile 615 ) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/data_objects/cell_specimens/traces/demixed_traces.py:44, in DemixedTraces.from_nwb(cls, nwbfile) 41 @classmethod 42 def from_nwb(cls, nwbfile: NWBFile) -> "DemixedTraces": 43 demixed_traces_nwb = ( ---> 44 nwbfile.processing["ophys"] 45 .data_interfaces["demixed_trace"] 46 .roi_response_series["traces"] 47 ) 48 # f traces stored as timepoints x rois in NWB 49 # We want rois x timepoints, hence the transpose 50 f_traces = demixed_traces_nwb.data[:].T.copy() File ~/.local/lib/python3.8/site-packages/hdmf/utils.py:1015, in LabelledDict.__getitem__(self, args) 1013 return super().__getitem__(val) 1014 else: -> 1015 return super().__getitem__(key) KeyError: 'demixed_trace' INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/brain_observatory_monitor.ipynb INFO:papermill:Output Notebook: /tmp/tmpeym71pin/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/20 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 5%|▌ | 1/20 [00:01<00:20, 1.06s/cell] Executing: 25%|██▌ | 5/20 [00:03<00:11, 1.33cell/s] Executing: 35%|███▌ | 7/20 [00:15<00:33, 2.61s/cell] Executing: 45%|████▌ | 9/20 [00:15<00:19, 1.78s/cell] Executing: 55%|█████▌ | 11/20 [00:15<00:10, 1.22s/cell] Executing: 65%|██████▌ | 13/20 [00:17<00:08, 1.16s/cell] Executing: 75%|███████▌ | 15/20 [00:22<00:07, 1.57s/cell] Executing: 85%|████████▌ | 17/20 [00:33<00:08, 2.81s/cell] Executing: 100%|██████████| 20/20 [00:40<00:00, 2.53s/cell] Executing: 100%|██████████| 20/20 [00:40<00:00, 2.05s/cell] INFO:root:Executing notebook succeeded. Overwriting with new notebook output. Moving /tmp/tmpeym71pin/scratch_nb.ipynb to doc_template/examples_root/examples/nb/brain_observatory_monitor.ipynb INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/brain_observatory.ipynb INFO:papermill:Output Notebook: /tmp/tmpq0mjl5vo/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted WARNING:papermill:Input notebook does not contain a cell with tag 'parameters' Executing: 0%| | 0/45 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 2%|▏ | 1/45 [00:01<00:50, 1.15s/cell] Executing: 13%|█▎ | 6/45 [00:10<01:06, 1.72s/cell] Executing: 18%|█▊ | 8/45 [00:10<00:43, 1.17s/cell] Executing: 22%|██▏ | 10/45 [00:10<00:28, 1.22cell/s] Executing: 27%|██▋ | 12/45 [00:10<00:19, 1.74cell/s] Executing: 31%|███ | 14/45 [00:24<00:17, 1.74cell/s] Executing: 33%|███▎ | 15/45 [00:38<02:01, 4.05s/cell] Executing: 38%|███▊ | 17/45 [00:38<01:23, 2.99s/cell] Executing: 42%|████▏ | 19/45 [00:43<01:13, 2.82s/cell] Executing: 47%|████▋ | 21/45 [05:20<16:48, 42.02s/cell] Executing: 51%|█████ | 23/45 [05:21<10:56, 29.85s/cell] Executing: 53%|█████▎ | 24/45 [05:22<08:42, 24.88s/cell] Executing: 56%|█████▌ | 25/45 [05:38<07:43, 23.18s/cell] Executing: 58%|█████▊ | 26/45 [05:39<05:48, 18.32s/cell] Executing: 60%|██████ | 27/45 [05:39<04:11, 13.98s/cell] Executing: 62%|██████▏ | 28/45 [05:41<03:02, 10.74s/cell] Executing: 67%|██████▋ | 30/45 [05:46<01:49, 7.29s/cell] Executing: 71%|███████ | 32/45 [07:24<04:59, 23.07s/cell] Executing: 73%|███████▎ | 33/45 [07:25<03:39, 18.27s/cell] Executing: 78%|███████▊ | 35/45 [07:32<02:07, 12.70s/cell] Executing: 82%|████████▏ | 37/45 [07:32<01:06, 8.33s/cell] Executing: 87%|████████▋ | 39/45 [07:32<00:33, 5.60s/cell] Executing: 87%|████████▋ | 39/45 [07:33<01:09, 11.63s/cell] ERROR:root: --------------------------------------------------------------------------- Exception encountered at "In [25]": --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In [25], line 1 ----> 1 from allensdk.brain_observatory.dff import compute_dff 3 plt.figure(figsize=(14,4)) 4 plt.title("dF/F Trace") ImportError: cannot import name 'compute_dff' from 'allensdk.brain_observatory.dff' (/home/runner/work/AllenSDK/AllenSDK/allensdk/brain_observatory/dff.py) INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/visual_behavior_neuropixels_quality_metrics.ipynb INFO:papermill:Output Notebook: /tmp/tmprjvzof3g/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/76 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 1%|▏ | 1/76 [00:01<01:22, 1.11s/cell] Executing: 7%|▋ | 5/76 [00:07<01:47, 1.51s/cell] Executing: 11%|█ | 8/76 [00:15<02:20, 2.07s/cell] Executing: 14%|█▍ | 11/76 [00:15<01:20, 1.24s/cell] Executing: 18%|█▊ | 14/76 [00:15<00:50, 1.23cell/s] Executing: 21%|██ | 16/76 [00:16<00:38, 1.55cell/s] Executing: 24%|██▎ | 18/76 [00:16<00:29, 1.96cell/s] Executing: 26%|██▋ | 20/76 [00:16<00:23, 2.36cell/s] Executing: 32%|███▏ | 24/76 [00:17<00:15, 3.36cell/s] Executing: 36%|███▌ | 27/76 [00:17<00:10, 4.70cell/s] Executing: 39%|███▉ | 30/76 [00:17<00:08, 5.26cell/s] Executing: 43%|████▎ | 33/76 [00:17<00:06, 7.03cell/s] Executing: 47%|████▋ | 36/76 [00:18<00:05, 7.24cell/s] Executing: 50%|█████ | 38/76 [00:18<00:05, 6.65cell/s] Executing: 54%|█████▍ | 41/76 [00:18<00:03, 8.75cell/s] Executing: 58%|█████▊ | 44/76 [00:19<00:03, 8.30cell/s] Executing: 62%|██████▏ | 47/76 [00:19<00:02, 10.58cell/s] Executing: 64%|██████▍ | 49/76 [00:19<00:03, 8.76cell/s] Executing: 68%|██████▊ | 52/76 [00:19<00:02, 11.09cell/s] Executing: 71%|███████ | 54/76 [00:20<00:02, 8.78cell/s] Executing: 75%|███████▌ | 57/76 [00:20<00:02, 8.12cell/s] Executing: 79%|███████▉ | 60/76 [00:20<00:01, 10.43cell/s] Executing: 82%|████████▏ | 62/76 [00:21<00:02, 5.45cell/s] Executing: 84%|████████▍ | 64/76 [00:21<00:01, 6.52cell/s] Executing: 87%|████████▋ | 66/76 [00:22<00:01, 7.59cell/s] Executing: 89%|████████▉ | 68/76 [00:41<00:01, 7.59cell/s] Executing: 91%|█████████ | 69/76 [01:53<01:18, 11.16s/cell] Executing: 91%|█████████ | 69/76 [01:54<00:11, 1.66s/cell] ERROR:root: --------------------------------------------------------------------------- Exception encountered at "In [25]": --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In [25], line 1 ----> 1 session = cache.get_ecephys_session( 2 ecephys_session_id=1065437523) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/behavior_neuropixels_project_cache.py:149, in VisualBehaviorNeuropixelsProjectCache.get_ecephys_session(self, ecephys_session_id) 129 def get_ecephys_session( 130 self, 131 ecephys_session_id: int 132 ) -> BehaviorEcephysSession: 133 """ 134 Loads all data for `ecephys_session_id` into an 135 `allensdk.ecephys.behavior_ecephys_session.BehaviorEcephysSession` (...) 147 148 """ --> 149 return self.fetch_api.get_ecephys_session(ecephys_session_id) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/project_apis/data_io/behavior_neuropixels_project_cloud_api.py:114, in VisualBehaviorNeuropixelsProjectCloudApi.get_ecephys_session(self, ecephys_session_id) 111 return f 113 if not probes_meta.empty: --> 114 probe_data_path_map = { 115 p.name: make_lazy_load_filepath_function( 116 file_id=str(int(getattr(p, self.cache.file_id_column))) 117 ) for p in probes_meta.itertuples(index=False)} 118 else: 119 probe_data_path_map = None File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/project_apis/data_io/behavior_neuropixels_project_cloud_api.py:116, in <dictcomp>(.0) 111 return f 113 if not probes_meta.empty: 114 probe_data_path_map = { 115 p.name: make_lazy_load_filepath_function( --> 116 file_id=str(int(getattr(p, self.cache.file_id_column))) 117 ) for p in probes_meta.itertuples(index=False)} 118 else: 119 probe_data_path_map = None AttributeError: 'Pandas' object has no attribute 'file_id' INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/brain_observatory_stimuli.ipynb INFO:papermill:Output Notebook: /tmp/tmpgwfm0hr7/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/21 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 5%|▍ | 1/21 [00:01<00:20, 1.02s/cell] Executing: 24%|██▍ | 5/21 [00:01<00:03, 4.08cell/s] Executing: 33%|███▎ | 7/21 [00:14<00:36, 2.58s/cell] Executing: 43%|████▎ | 9/21 [00:24<00:41, 3.42s/cell] Executing: 52%|█████▏ | 11/21 [00:26<00:26, 2.63s/cell] Executing: 62%|██████▏ | 13/21 [00:26<00:14, 1.83s/cell] Executing: 71%|███████▏ | 15/21 [00:27<00:08, 1.43s/cell] Executing: 81%|████████ | 17/21 [00:28<00:04, 1.08s/cell] Executing: 90%|█████████ | 19/21 [00:48<00:07, 3.85s/cell] Executing: 100%|██████████| 21/21 [00:49<00:00, 2.82s/cell] Executing: 100%|██████████| 21/21 [00:50<00:00, 2.39s/cell] ERROR:root: --------------------------------------------------------------------------- Exception encountered at "In [12]": --------------------------------------------------------------------------- KeyError Traceback (most recent call last) Cell In [12], line 10 8 # pull these trials out of the stimulus table 9 stim_table = data_set.get_stimulus_table('locally_sparse_noise') ---> 10 stim_table = stim_table.loc[on_frames] 12 plot_stimulus_table(stim_table, "loc (%d,%d) " % loc) File ~/.local/lib/python3.8/site-packages/pandas/core/indexing.py:1073, in _LocationIndexer.__getitem__(self, key) 1070 axis = self.axis or 0 1072 maybe_callable = com.apply_if_callable(key, self.obj) -> 1073 return self._getitem_axis(maybe_callable, axis=axis) File ~/.local/lib/python3.8/site-packages/pandas/core/indexing.py:1301, in _LocIndexer._getitem_axis(self, key, axis) 1298 if hasattr(key, "ndim") and key.ndim > 1: 1299 raise ValueError("Cannot index with multidimensional key") -> 1301 return self._getitem_iterable(key, axis=axis) 1303 # nested tuple slicing 1304 if is_nested_tuple(key, labels): File ~/.local/lib/python3.8/site-packages/pandas/core/indexing.py:1239, in _LocIndexer._getitem_iterable(self, key, axis) 1236 self._validate_key(key, axis) 1238 # A collection of keys -> 1239 keyarr, indexer = self._get_listlike_indexer(key, axis) 1240 return self.obj._reindex_with_indexers( 1241 {axis: [keyarr, indexer]}, copy=True, allow_dups=True 1242 ) File ~/.local/lib/python3.8/site-packages/pandas/core/indexing.py:1432, in _LocIndexer._get_listlike_indexer(self, key, axis) 1429 ax = self.obj._get_axis(axis) 1430 axis_name = self.obj._get_axis_name(axis) -> 1432 keyarr, indexer = ax._get_indexer_strict(key, axis_name) 1434 return keyarr, indexer File ~/.local/lib/python3.8/site-packages/pandas/core/indexes/base.py:6111, in Index._get_indexer_strict(self, key, axis_name) 6108 else: 6109 keyarr, indexer, new_indexer = self._reindex_non_unique(keyarr) -> 6111 self._raise_if_missing(keyarr, indexer, axis_name) 6113 keyarr = self.take(indexer) 6114 if isinstance(key, Index): 6115 # GH 42790 - Preserve name from an Index File ~/.local/lib/python3.8/site-packages/pandas/core/indexes/base.py:6174, in Index._raise_if_missing(self, key, indexer, axis_name) 6171 raise KeyError(f"None of [{key}] are in the [{axis_name}]") 6173 not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) -> 6174 raise KeyError(f"{not_found} not in index") KeyError: '[8884, 8890, 8897, 8981, 8984] not in index' INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/ecephys_optotagging.ipynb INFO:papermill:Output Notebook: /tmp/tmpufvpx4_l/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/56 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 2%|▏ | 1/56 [00:01<01:03, 1.15s/cell] Executing: 5%|▌ | 3/56 [00:10<03:10, 3.60s/cell] Executing: 12%|█▎ | 7/56 [00:10<01:02, 1.27s/cell] Executing: 12%|█▎ | 7/56 [00:11<01:20, 1.64s/cell] ERROR:root: --------------------------------------------------------------------------- Exception encountered at "In [4]": --------------------------------------------------------------------------- PermissionError Traceback (most recent call last) Cell In [4], line 3 1 manifest_path = os.path.join(data_directory, "manifest.json") ----> 3 cache = EcephysProjectCache.from_warehouse(manifest=manifest_path) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/ecephys/ecephys_project_cache.py:699, in EcephysProjectCache.from_warehouse(cls, scheme, host, asynchronous, manifest, version, cache, fetch_tries, timeout) 697 app_kwargs = {"asynchronous": asynchronous} 698 app_kwargs['timeout'] = timeout --> 699 return cls._from_http_source_default( 700 EcephysProjectWarehouseApi, app_kwargs, manifest=manifest, 701 version=version, cache=cache, fetch_tries=fetch_tries 702 ) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/ecephys/ecephys_project_cache.py:591, in EcephysProjectCache._from_http_source_default(cls, fetch_api_cls, fetch_api_kwargs, **kwargs) 588 else: 589 kwargs["stream_writer"] = write_from_stream --> 591 return cls( 592 fetch_api=fetch_api_cls.default(**fetch_api_kwargs), 593 **kwargs 594 ) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/ecephys/ecephys_project_cache.py:165, in EcephysProjectCache.__init__(self, fetch_api, fetch_tries, stream_writer, manifest, version, cache) 162 manifest_ = manifest or "ecephys_project_manifest.json" 163 version_ = version or self.MANIFEST_VERSION --> 165 super(EcephysProjectCache, self).__init__(manifest=manifest_, 166 version=version_, 167 cache=cache) 168 self.fetch_api = (EcephysProjectWarehouseApi.default() 169 if fetch_api is None else fetch_api) 170 self.fetch_tries = fetch_tries File ~/work/AllenSDK/AllenSDK/allensdk/api/warehouse_cache/cache.py:105, in Cache.__init__(self, manifest, cache, version, **kwargs) 103 if version is None and hasattr(self, 'MANIFEST_VERSION'): 104 version = self.MANIFEST_VERSION --> 105 self.load_manifest(manifest, version) File ~/work/AllenSDK/AllenSDK/allensdk/api/warehouse_cache/cache.py:147, in Cache.load_manifest(self, file_name, version) 145 dirname = os.path.dirname(file_name) 146 if dirname: --> 147 Manifest.safe_mkdir(dirname) 149 self.build_manifest(file_name) 151 try: File ~/work/AllenSDK/AllenSDK/allensdk/config/manifest.py:340, in Manifest.safe_mkdir(cls, directory) 337 leftmost = str(sub_path) 339 try: --> 340 os.makedirs(directory) 341 except OSError as e: 342 if ((sys.platform == "darwin") and (e.errno == errno.EISDIR) and \ 343 (e.filename == "/")): 344 # undocumented behavior of mkdir on OSX where for / it raises 345 # EISDIR and not EEXIST 346 # https://bugs.python.org/issue24231 (old but still holds true) File /usr/lib/python3.8/os.py:213, in makedirs(name, mode, exist_ok) 211 if head and tail and not path.exists(head): 212 try: --> 213 makedirs(head, exist_ok=exist_ok) 214 except FileExistsError: 215 # Defeats race condition when another thread created the path 216 pass File /usr/lib/python3.8/os.py:223, in makedirs(name, mode, exist_ok) 221 return 222 try: --> 223 mkdir(name, mode) 224 except OSError: 225 # Cannot rely on checking for EEXIST, since the operating system 226 # could give priority to other errors like EACCES or EROFS 227 if not exist_ok or not path.isdir(name): PermissionError: [Errno 13] Permission denied: '/local1' INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/image_download.ipynb INFO:papermill:Output Notebook: /tmp/tmpi8hsm44f/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/50 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 2%|▏ | 1/50 [00:00<00:48, 1.01cell/s] Executing: 6%|▌ | 3/50 [00:03<00:54, 1.16s/cell] Executing: 18%|█▊ | 9/50 [00:03<00:11, 3.44cell/s] Executing: 30%|███ | 15/50 [00:04<00:08, 4.29cell/s] Executing: 36%|███▌ | 18/50 [00:04<00:05, 5.51cell/s] Executing: 40%|████ | 20/50 [00:04<00:04, 6.22cell/s] Executing: 44%|████▍ | 22/50 [00:09<00:18, 1.53cell/s] Executing: 48%|████▊ | 24/50 [00:12<00:22, 1.13cell/s] Executing: 52%|█████▏ | 26/50 [00:12<00:16, 1.49cell/s] Executing: 56%|█████▌ | 28/50 [00:14<00:16, 1.35cell/s] Executing: 58%|█████▊ | 29/50 [00:14<00:13, 1.56cell/s] Executing: 60%|██████ | 30/50 [00:16<00:15, 1.28cell/s] Executing: 62%|██████▏ | 31/50 [00:16<00:12, 1.52cell/s] Executing: 64%|██████▍ | 32/50 [00:20<00:25, 1.40s/cell] Executing: 66%|██████▌ | 33/50 [00:20<00:18, 1.10s/cell] Executing: 68%|██████▊ | 34/50 [00:20<00:13, 1.16cell/s] Executing: 70%|███████ | 35/50 [00:21<00:10, 1.38cell/s] Executing: 72%|███████▏ | 36/50 [00:21<00:08, 1.74cell/s] Executing: 74%|███████▍ | 37/50 [00:21<00:06, 2.12cell/s] Executing: 76%|███████▌ | 38/50 [00:21<00:04, 2.53cell/s] Executing: 78%|███████▊ | 39/50 [00:21<00:03, 2.92cell/s] Executing: 80%|████████ | 40/50 [00:22<00:03, 3.33cell/s] Executing: 82%|████████▏ | 41/50 [00:22<00:03, 2.73cell/s] Executing: 84%|████████▍ | 42/50 [00:22<00:02, 3.17cell/s] Executing: 86%|████████▌ | 43/50 [01:16<01:53, 16.27s/cell] Executing: 88%|████████▊ | 44/50 [01:16<01:08, 11.47s/cell] Executing: 90%|█████████ | 45/50 [01:16<00:40, 8.10s/cell] Executing: 92%|█████████▏| 46/50 [01:18<00:24, 6.07s/cell] Executing: 94%|█████████▍| 47/50 [01:18<00:12, 4.31s/cell] Executing: 96%|█████████▌| 48/50 [01:19<00:06, 3.20s/cell] Executing: 98%|█████████▊| 49/50 [01:19<00:02, 2.31s/cell] Executing: 100%|██████████| 50/50 [01:19<00:00, 1.69s/cell] Executing: 100%|██████████| 50/50 [01:20<00:00, 1.60s/cell] INFO:root:Executing notebook succeeded. Overwriting with new notebook output. Moving /tmp/tmpi8hsm44f/scratch_nb.ipynb to doc_template/examples_root/examples/nb/image_download.ipynb INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/visual_behavior_neuropixels_dataset_manifest.ipynb INFO:papermill:Output Notebook: /tmp/tmpd6x3we61/scratch_nb.ipynb /home/runner/.local/lib/python3.8/site-packages/nbformat/__init__.py:92: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. validate(nb) WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/77 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 1%|▏ | 1/77 [00:01<01:34, 1.25s/cell] Executing: 6%|▋ | 5/77 [00:04<00:56, 1.27cell/s] Executing: 10%|█ | 8/77 [00:08<01:19, 1.15s/cell] Executing: 13%|█▎ | 10/77 [00:15<01:58, 1.77s/cell] Executing: 18%|█▊ | 14/77 [00:21<01:45, 1.68s/cell] Executing: 19%|█▉ | 15/77 [00:23<01:48, 1.75s/cell] Executing: 22%|██▏ | 17/77 [00:23<01:15, 1.26s/cell] Executing: 27%|██▋ | 21/77 [00:23<00:39, 1.43cell/s] Executing: 31%|███ | 24/77 [00:23<00:25, 2.07cell/s] Executing: 35%|███▌ | 27/77 [00:23<00:17, 2.93cell/s] Executing: 40%|████ | 31/77 [00:24<00:10, 4.41cell/s] Executing: 44%|████▍ | 34/77 [00:24<00:07, 5.76cell/s] Executing: 48%|████▊ | 37/77 [00:24<00:05, 7.30cell/s] Executing: 53%|█████▎ | 41/77 [00:24<00:03, 9.92cell/s] Executing: 57%|█████▋ | 44/77 [00:24<00:02, 11.31cell/s] Executing: 61%|██████ | 47/77 [00:24<00:02, 13.15cell/s] Executing: 65%|██████▍ | 50/77 [00:24<00:01, 15.17cell/s] Executing: 69%|██████▉ | 53/77 [00:25<00:01, 17.22cell/s] Executing: 73%|███████▎ | 56/77 [00:25<00:01, 19.38cell/s] Executing: 77%|███████▋ | 59/77 [00:25<00:00, 20.18cell/s] Executing: 81%|████████ | 62/77 [00:25<00:00, 20.08cell/s] Executing: 84%|████████▍ | 65/77 [00:25<00:00, 16.43cell/s] Executing: 88%|████████▊ | 68/77 [00:25<00:00, 17.69cell/s] Executing: 92%|█████████▏| 71/77 [00:26<00:00, 17.99cell/s] Executing: 96%|█████████▌| 74/77 [00:26<00:00, 15.97cell/s] Executing: 99%|█████████▊| 76/77 [00:27<00:00, 7.38cell/s] Executing: 100%|██████████| 77/77 [00:27<00:00, 2.77cell/s] INFO:root:Executing notebook succeeded. Overwriting with new notebook output. Moving /tmp/tmpd6x3we61/scratch_nb.ipynb to doc_template/examples_root/examples/nb/visual_behavior_neuropixels_dataset_manifest.ipynb INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/mouse_connectivity.ipynb INFO:papermill:Output Notebook: /tmp/tmp76v3x1kg/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted WARNING:papermill:Input notebook does not contain a cell with tag 'parameters' Executing: 0%| | 0/30 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 3%|▎ | 1/30 [00:00<00:28, 1.02cell/s] Executing: 17%|█▋ | 5/30 [00:06<00:34, 1.39s/cell] Executing: 23%|██▎ | 7/30 [00:06<00:20, 1.12cell/s] Executing: 30%|███ | 9/30 [00:12<00:33, 1.62s/cell] Executing: 37%|███▋ | 11/30 [00:13<00:20, 1.10s/cell] Executing: 50%|█████ | 15/30 [00:13<00:08, 1.70cell/s] Executing: 53%|█████▎ | 16/30 [00:25<00:08, 1.70cell/s] Executing: 57%|█████▋ | 17/30 [01:16<01:51, 8.61s/cell] Executing: 67%|██████▋ | 20/30 [01:16<00:55, 5.55s/cell] Executing: 73%|███████▎ | 22/30 [01:18<00:34, 4.33s/cell] Executing: 83%|████████▎ | 25/30 [01:34<00:23, 4.79s/cell] Executing: 90%|█████████ | 27/30 [01:35<00:11, 3.69s/cell] Executing: 93%|█████████▎| 28/30 [01:36<00:06, 3.21s/cell] Executing: 100%|██████████| 30/30 [01:36<00:00, 2.27s/cell] Executing: 100%|██████████| 30/30 [01:37<00:00, 3.23s/cell] INFO:root:Executing notebook succeeded. Overwriting with new notebook output. Moving /tmp/tmp76v3x1kg/scratch_nb.ipynb to doc_template/examples_root/examples/nb/mouse_connectivity.ipynb INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/ecephys_quickstart.ipynb INFO:papermill:Output Notebook: /tmp/tmp4um8zdvn/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/32 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 3%|▎ | 1/32 [00:01<00:32, 1.05s/cell] Executing: 6%|▋ | 2/32 [00:09<02:47, 5.59s/cell] Executing: 19%|█▉ | 6/32 [03:16<16:09, 37.30s/cell] Executing: 25%|██▌ | 8/32 [03:17<09:42, 24.26s/cell] Executing: 34%|███▍ | 11/32 [04:10<07:29, 21.42s/cell] Executing: 41%|████ | 13/32 [04:39<06:07, 19.34s/cell] Executing: 41%|████ | 13/32 [04:40<06:50, 21.60s/cell] ERROR:root: --------------------------------------------------------------------------- Exception encountered at "In [7]": --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In [7], line 1 ----> 1 session.metadata File ~/work/AllenSDK/AllenSDK/allensdk/core/lazy_property/lazy_property_mixin.py:13, in LazyPropertyMixin.__getattribute__(self, name) 10 def __getattribute__(self, name): 12 lazy_class = super(LazyPropertyMixin, self).__getattribute__('LazyProperty') ---> 13 curr_attr = super(LazyPropertyMixin, self).__getattribute__(name) 14 if isinstance(curr_attr, lazy_class): 15 return curr_attr.__get__(curr_attr) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/ecephys/ecephys_session.py:257, in EcephysSession.metadata(self) 245 @property 246 def metadata(self): 247 return { 248 "specimen_name": self.specimen_name, 249 "session_type": self.session_type, 250 "full_genotype": self.full_genotype, 251 "sex": self.sex, 252 "age_in_days": self.age_in_days, 253 "rig_equipment_name": self.rig_equipment_name, 254 "num_units": self.num_units, 255 "num_channels": self.num_channels, 256 "num_probes": self.num_probes, --> 257 "num_stimulus_presentations": self.num_stimulus_presentations, 258 "session_start_time": self.session_start_time, 259 "ecephys_session_id": self.ecephys_session_id, 260 "structure_acronyms": self.structure_acronyms, 261 "stimulus_names": self.stimulus_names 262 } File ~/work/AllenSDK/AllenSDK/allensdk/core/lazy_property/lazy_property_mixin.py:13, in LazyPropertyMixin.__getattribute__(self, name) 10 def __getattribute__(self, name): 12 lazy_class = super(LazyPropertyMixin, self).__getattribute__('LazyProperty') ---> 13 curr_attr = super(LazyPropertyMixin, self).__getattribute__(name) 14 if isinstance(curr_attr, lazy_class): 15 return curr_attr.__get__(curr_attr) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/ecephys/ecephys_session.py:180, in EcephysSession.num_stimulus_presentations(self) 178 @property 179 def num_stimulus_presentations(self): --> 180 return self.stimulus_presentations.shape[0] File ~/work/AllenSDK/AllenSDK/allensdk/core/lazy_property/lazy_property_mixin.py:13, in LazyPropertyMixin.__getattribute__(self, name) 10 def __getattribute__(self, name): 12 lazy_class = super(LazyPropertyMixin, self).__getattribute__('LazyProperty') ---> 13 curr_attr = super(LazyPropertyMixin, self).__getattribute__(name) 14 if isinstance(curr_attr, lazy_class): 15 return curr_attr.__get__(curr_attr) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/ecephys/ecephys_session.py:267, in EcephysSession.stimulus_presentations(self) 264 @property 265 def stimulus_presentations(self): 266 return self.__class__._remove_detailed_stimulus_parameters( --> 267 self._stimulus_presentations) File ~/work/AllenSDK/AllenSDK/allensdk/core/lazy_property/lazy_property_mixin.py:15, in LazyPropertyMixin.__getattribute__(self, name) 13 curr_attr = super(LazyPropertyMixin, self).__getattribute__(name) 14 if isinstance(curr_attr, lazy_class): ---> 15 return curr_attr.__get__(curr_attr) 16 else: 17 return super(LazyPropertyMixin, self).__getattribute__(name) File ~/work/AllenSDK/AllenSDK/allensdk/core/lazy_property/lazy_property.py:20, in LazyProperty.__get__(self, obj, objtype) 17 return self 19 if self.value is None: ---> 20 self.value = self.calculate() 21 return self.value File ~/work/AllenSDK/AllenSDK/allensdk/core/lazy_property/lazy_property.py:32, in LazyProperty.calculate(self) 30 result = self.api_method(*self.args, **self.kwargs) 31 for wrapper in self.wrappers: ---> 32 result = wrapper(result) 33 return result File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/ecephys/ecephys_session.py:1127, in EcephysSession._build_stimulus_presentations(self, stimulus_presentations, nonapplicable) 1124 # pandas groupby ops ignore nans, so we need a new "nonapplicable" 1125 # value that pandas does not recognize as null ... 1126 stimulus_presentations.replace("", nonapplicable, inplace=True) -> 1127 stimulus_presentations.fillna(nonapplicable, inplace=True) 1129 stimulus_presentations['duration'] = \ 1130 stimulus_presentations['stop_time'] - \ 1131 stimulus_presentations['start_time'] 1133 # TODO: database these File ~/.local/lib/python3.8/site-packages/pandas/util/_decorators.py:331, in deprecate_nonkeyword_arguments.<locals>.decorate.<locals>.wrapper(*args, **kwargs) 325 if len(args) > num_allow_args: 326 warnings.warn( 327 msg.format(arguments=_format_argument_list(allow_args)), 328 FutureWarning, 329 stacklevel=find_stack_level(), 330 ) --> 331 return func(*args, **kwargs) File ~/.local/lib/python3.8/site-packages/pandas/core/frame.py:5624, in DataFrame.fillna(self, value, method, axis, inplace, limit, downcast) 5613 @deprecate_nonkeyword_arguments(version=None, allowed_args=["self", "value"]) 5614 @doc(NDFrame.fillna, **_shared_doc_kwargs) 5615 def fillna( # type: ignore[override] (...) 5622 downcast: dict | None = None, 5623 ) -> DataFrame | None: -> 5624 return super().fillna( 5625 value=value, 5626 method=method, 5627 axis=axis, 5628 inplace=inplace, 5629 limit=limit, 5630 downcast=downcast, 5631 ) File ~/.local/lib/python3.8/site-packages/pandas/core/generic.py:6922, in NDFrame.fillna(self, value, method, axis, inplace, limit, downcast) 6919 new_data = result # type: ignore[assignment] 6920 else: -> 6922 new_data = self._mgr.fillna( 6923 value=value, limit=limit, inplace=inplace, downcast=downcast 6924 ) 6925 elif isinstance(value, ABCDataFrame) and self.ndim == 2: 6927 new_data = self.where(self.notna(), value)._mgr File ~/.local/lib/python3.8/site-packages/pandas/core/internals/managers.py:440, in BaseBlockManager.fillna(self, value, limit, inplace, downcast) 435 if _using_copy_on_write() and any( 436 not self._has_no_reference_block(i) for i in range(len(self.blocks)) 437 ): 438 self = self.copy() --> 440 return self.apply( 441 "fillna", value=value, limit=limit, inplace=inplace, downcast=downcast 442 ) File ~/.local/lib/python3.8/site-packages/pandas/core/internals/managers.py:347, in BaseBlockManager.apply(self, f, align_keys, ignore_failures, **kwargs) 345 applied = b.apply(f, **kwargs) 346 else: --> 347 applied = getattr(b, f)(**kwargs) 348 except (TypeError, NotImplementedError): 349 if not ignore_failures: File ~/.local/lib/python3.8/site-packages/pandas/core/internals/blocks.py:1584, in EABackedBlock.fillna(self, value, limit, inplace, downcast) 1579 return [res_blk] 1581 # TODO: since this now dispatches to super, which in turn dispatches 1582 # to putmask, it may *actually* respect 'inplace=True'. If so, add 1583 # tests for this. -> 1584 return super().fillna(value, limit=limit, inplace=inplace, downcast=downcast) File ~/.local/lib/python3.8/site-packages/pandas/core/internals/blocks.py:1194, in Block.fillna(self, value, limit, inplace, downcast) 1191 mask[mask.cumsum(self.ndim - 1) > limit] = False 1193 if inplace: -> 1194 nbs = self.putmask(mask.T, value) 1195 else: 1196 # without _downcast, we would break 1197 # test_fillna_dtype_conversion_equiv_replace 1198 nbs = self.where(value, ~mask.T, _downcast=False) File ~/.local/lib/python3.8/site-packages/pandas/core/internals/blocks.py:1517, in EABackedBlock.putmask(self, mask, new) 1513 return [self] 1515 try: 1516 # Caller is responsible for ensuring matching lengths -> 1517 values._putmask(mask, new) 1518 except (TypeError, ValueError) as err: 1519 _catch_deprecated_value_error(err) File ~/.local/lib/python3.8/site-packages/pandas/core/arrays/base.py:1523, in ExtensionArray._putmask(self, mask, value) 1520 else: 1521 val = value -> 1523 self[mask] = val File ~/.local/lib/python3.8/site-packages/pandas/core/arrays/masked.py:232, in BaseMaskedArray.__setitem__(self, key, value) 230 self._mask[key] = True 231 else: --> 232 value = self._validate_setitem_value(value) 233 self._data[key] = value 234 self._mask[key] = False File ~/.local/lib/python3.8/site-packages/pandas/core/arrays/masked.py:223, in BaseMaskedArray._validate_setitem_value(self, value) 218 return value 219 # TODO: unsigned checks 220 221 # Note: without the "str" here, the f-string rendering raises in 222 # py38 builds. --> 223 raise TypeError(f"Invalid value '{str(value)}' for dtype {self.dtype}") TypeError: Invalid value 'null' for dtype boolean INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/visual_behavior_neuropixels_quickstart.ipynb INFO:papermill:Output Notebook: /tmp/tmpcozx0no_/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/41 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 2%|▏ | 1/41 [00:01<01:10, 1.77s/cell] Executing: 5%|▍ | 2/41 [00:09<03:27, 5.33s/cell] Executing: 15%|█▍ | 6/41 [00:16<01:30, 2.59s/cell] Executing: 24%|██▍ | 10/41 [01:47<06:46, 13.11s/cell] Executing: 24%|██▍ | 10/41 [01:48<05:35, 10.81s/cell] ERROR:root: --------------------------------------------------------------------------- Exception encountered at "In [6]": --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In [6], line 2 1 session_id = 1064644573 ----> 2 session = cache.get_ecephys_session( 3 ecephys_session_id=session_id) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/behavior_neuropixels_project_cache.py:149, in VisualBehaviorNeuropixelsProjectCache.get_ecephys_session(self, ecephys_session_id) 129 def get_ecephys_session( 130 self, 131 ecephys_session_id: int 132 ) -> BehaviorEcephysSession: 133 """ 134 Loads all data for `ecephys_session_id` into an 135 `allensdk.ecephys.behavior_ecephys_session.BehaviorEcephysSession` (...) 147 148 """ --> 149 return self.fetch_api.get_ecephys_session(ecephys_session_id) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/project_apis/data_io/behavior_neuropixels_project_cloud_api.py:114, in VisualBehaviorNeuropixelsProjectCloudApi.get_ecephys_session(self, ecephys_session_id) 111 return f 113 if not probes_meta.empty: --> 114 probe_data_path_map = { 115 p.name: make_lazy_load_filepath_function( 116 file_id=str(int(getattr(p, self.cache.file_id_column))) 117 ) for p in probes_meta.itertuples(index=False)} 118 else: 119 probe_data_path_map = None File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/project_apis/data_io/behavior_neuropixels_project_cloud_api.py:116, in <dictcomp>(.0) 111 return f 113 if not probes_meta.empty: 114 probe_data_path_map = { 115 p.name: make_lazy_load_filepath_function( --> 116 file_id=str(int(getattr(p, self.cache.file_id_column))) 117 ) for p in probes_meta.itertuples(index=False)} 118 else: 119 probe_data_path_map = None AttributeError: 'Pandas' object has no attribute 'file_id' INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/cell_specimen_mapping.ipynb INFO:papermill:Output Notebook: /tmp/tmpi0p6yaqc/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/10 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 10%|█ | 1/10 [00:01<00:10, 1.17s/cell] Executing: 60%|██████ | 6/10 [00:03<00:02, 1.79cell/s] Executing: 90%|█████████ | 9/10 [05:36<00:47, 47.93s/cell] Executing: 100%|██████████| 10/10 [05:36<00:00, 33.69s/cell] INFO:root:Executing notebook succeeded. Overwriting with new notebook output. Moving /tmp/tmpi0p6yaqc/scratch_nb.ipynb to doc_template/examples_root/examples/nb/cell_specimen_mapping.ipynb INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/visual_behavior_ophys_dataset_manifest.ipynb INFO:papermill:Output Notebook: /tmp/tmpu7f_b00k/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/169 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 1%| | 1/169 [00:01<04:21, 1.56s/cell] Executing: 2%|▏ | 3/169 [00:01<01:13, 2.25cell/s] Executing: 3%|▎ | 5/169 [00:04<02:40, 1.02cell/s] Executing: 4%|▍ | 7/169 [00:04<01:35, 1.70cell/s] Executing: 5%|▌ | 9/169 [00:09<03:24, 1.28s/cell] Executing: 6%|▌ | 10/169 [00:15<06:10, 2.33s/cell] Executing: 7%|▋ | 12/169 [00:15<03:50, 1.47s/cell] Executing: 8%|▊ | 14/169 [00:17<03:19, 1.29s/cell] Executing: 9%|▉ | 16/169 [00:17<02:14, 1.14cell/s] Executing: 11%|█ | 18/169 [00:18<01:32, 1.63cell/s] Executing: 12%|█▏ | 20/169 [00:18<01:05, 2.29cell/s] Executing: 13%|█▎ | 22/169 [00:18<00:46, 3.14cell/s] Executing: 14%|█▍ | 24/169 [00:18<00:35, 4.08cell/s] Executing: 15%|█▌ | 26/169 [00:18<00:26, 5.32cell/s] Executing: 17%|█▋ | 28/169 [00:18<00:21, 6.66cell/s] Executing: 18%|█▊ | 30/169 [00:18<00:17, 8.16cell/s] Executing: 19%|█▉ | 32/169 [00:18<00:14, 9.57cell/s] Executing: 20%|██ | 34/169 [00:19<00:12, 10.91cell/s] Executing: 21%|██▏ | 36/169 [00:19<00:11, 12.08cell/s] Executing: 22%|██▏ | 38/169 [00:19<00:10, 13.08cell/s] Executing: 24%|██▎ | 40/169 [00:19<00:09, 13.81cell/s] Executing: 25%|██▍ | 42/169 [00:19<00:09, 13.63cell/s] Executing: 26%|██▌ | 44/169 [00:19<00:08, 14.29cell/s] Executing: 27%|██▋ | 46/169 [00:19<00:08, 14.68cell/s] Executing: 28%|██▊ | 48/169 [00:19<00:07, 15.47cell/s] Executing: 30%|██▉ | 50/169 [00:20<00:07, 15.95cell/s] Executing: 31%|███ | 52/169 [00:20<00:07, 16.09cell/s] Executing: 32%|███▏ | 54/169 [00:20<00:07, 16.35cell/s] Executing: 33%|███▎ | 56/169 [00:20<00:06, 16.60cell/s] Executing: 34%|███▍ | 58/169 [00:20<00:07, 15.28cell/s] Executing: 36%|███▌ | 60/169 [00:20<00:07, 14.86cell/s] Executing: 37%|███▋ | 62/169 [00:20<00:07, 14.85cell/s] Executing: 38%|███▊ | 64/169 [00:20<00:07, 14.00cell/s] Executing: 39%|███▉ | 66/169 [00:21<00:07, 14.32cell/s] Executing: 40%|████ | 68/169 [00:21<00:07, 14.38cell/s] Executing: 41%|████▏ | 70/169 [00:21<00:06, 15.05cell/s] Executing: 43%|████▎ | 72/169 [00:21<00:06, 14.44cell/s] Executing: 44%|████▍ | 74/169 [00:21<00:06, 13.80cell/s] Executing: 45%|████▍ | 76/169 [00:21<00:06, 14.50cell/s] Executing: 46%|████▌ | 78/169 [00:21<00:06, 14.64cell/s] Executing: 47%|████▋ | 80/169 [00:22<00:06, 14.57cell/s] Executing: 49%|████▊ | 82/169 [00:22<00:05, 15.13cell/s] Executing: 50%|████▉ | 84/169 [00:22<00:06, 14.05cell/s] Executing: 51%|█████ | 86/169 [00:22<00:05, 14.54cell/s] Executing: 52%|█████▏ | 88/169 [00:22<00:05, 14.32cell/s] Executing: 53%|█████▎ | 90/169 [00:22<00:05, 14.88cell/s] Executing: 54%|█████▍ | 92/169 [00:22<00:05, 14.65cell/s] Executing: 56%|█████▌ | 94/169 [00:23<00:05, 14.10cell/s] Executing: 57%|█████▋ | 96/169 [00:23<00:04, 14.60cell/s] Executing: 58%|█████▊ | 98/169 [00:23<00:04, 15.11cell/s] Executing: 59%|█████▉ | 100/169 [00:23<00:04, 15.71cell/s] Executing: 60%|██████ | 102/169 [00:23<00:04, 15.63cell/s] Executing: 62%|██████▏ | 104/169 [00:23<00:04, 15.41cell/s] Executing: 63%|██████▎ | 106/169 [00:23<00:04, 15.35cell/s] Executing: 64%|██████▍ | 108/169 [00:23<00:03, 15.79cell/s] Executing: 65%|██████▌ | 110/169 [00:24<00:03, 15.02cell/s] Executing: 66%|██████▋ | 112/169 [00:24<00:04, 13.51cell/s] Executing: 67%|██████▋ | 114/169 [00:24<00:03, 13.82cell/s] Executing: 69%|██████▊ | 116/169 [00:24<00:03, 14.08cell/s] Executing: 70%|██████▉ | 118/169 [00:24<00:03, 13.60cell/s] Executing: 71%|███████ | 120/169 [00:24<00:03, 14.20cell/s] Executing: 72%|███████▏ | 122/169 [00:24<00:03, 14.17cell/s] Executing: 73%|███████▎ | 124/169 [00:25<00:03, 14.28cell/s] Executing: 75%|███████▍ | 126/169 [00:25<00:02, 14.59cell/s] Executing: 76%|███████▌ | 128/169 [00:25<00:02, 13.79cell/s] Executing: 77%|███████▋ | 130/169 [00:25<00:02, 13.49cell/s] Executing: 78%|███████▊ | 132/169 [00:25<00:02, 12.93cell/s] Executing: 79%|███████▉ | 134/169 [00:25<00:02, 13.09cell/s] Executing: 80%|████████ | 136/169 [00:26<00:02, 13.35cell/s] Executing: 82%|████████▏ | 138/169 [00:26<00:02, 13.93cell/s] Executing: 83%|████████▎ | 140/169 [00:26<00:02, 13.12cell/s] Executing: 84%|████████▍ | 142/169 [00:26<00:01, 13.82cell/s] Executing: 85%|████████▌ | 144/169 [00:26<00:01, 13.80cell/s] Executing: 86%|████████▋ | 146/169 [00:26<00:01, 13.90cell/s] Executing: 88%|████████▊ | 148/169 [00:26<00:01, 14.20cell/s] Executing: 89%|████████▉ | 150/169 [00:26<00:01, 14.34cell/s] Executing: 90%|████████▉ | 152/169 [00:27<00:01, 14.44cell/s] Executing: 91%|█████████ | 154/169 [00:27<00:01, 14.66cell/s] Executing: 92%|█████████▏| 156/169 [00:27<00:00, 14.54cell/s] Executing: 93%|█████████▎| 158/169 [00:27<00:00, 13.89cell/s] Executing: 94%|█████████▍| 159/169 [00:41<00:00, 13.89cell/s] Executing: 95%|█████████▍| 160/169 [00:42<00:20, 2.31s/cell] Executing: 95%|█████████▍| 160/169 [00:43<00:02, 3.67cell/s] ERROR:root: --------------------------------------------------------------------------- Exception encountered at "In [51]": --------------------------------------------------------------------------- KeyError Traceback (most recent call last) Cell In [51], line 9 6 # enumerate over experiments in this container 7 for i, ophys_experiment_id in enumerate(ophys_experiment_ids): 8 # get the dataset object ----> 9 dataset = cache.get_behavior_ophys_experiment(ophys_experiment_id=ophys_experiment_id) 10 # get the max intensity projection and plot on the appropriate axis 11 ax[i].imshow(dataset.max_projection.data, cmap='gray') File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/behavior_project_cache.py:324, in VisualBehaviorOphysProjectCache.get_behavior_ophys_experiment(self, ophys_experiment_id) 311 def get_behavior_ophys_experiment( 312 self, ophys_experiment_id: int 313 ) -> BehaviorOphysExperiment: 314 """ 315 Gets `BehaviorOphysExperiment` for `ophys_experiment_id` 316 Parameters (...) 322 BehaviorOphysExperiment 323 """ --> 324 return self.fetch_api.get_behavior_ophys_experiment( 325 ophys_experiment_id=ophys_experiment_id) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/project_apis/data_io/behavior_project_cloud_api.py:123, in BehaviorProjectCloudApi.get_behavior_ophys_experiment(self, ophys_experiment_id) 121 file_id = str(int(row[self.cache.file_id_column])) 122 data_path = self._get_data_path(file_id=file_id) --> 123 return BehaviorOphysExperiment.from_nwb_path( 124 str(data_path)) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_session.py:552, in BehaviorSession.from_nwb_path(cls, nwb_path, **kwargs) 550 with pynwb.NWBHDF5IO(nwb_path, 'r', load_namespaces=True) as read_io: 551 nwbfile = read_io.read() --> 552 return cls.from_nwb( 553 nwbfile=nwbfile, 554 **kwargs) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_ophys_experiment.py:237, in BehaviorOphysExperiment.from_nwb(cls, nwbfile, eye_tracking_z_threshold, eye_tracking_dilation_frames, events_filter_scale_seconds, events_filter_n_time_steps, exclude_invalid_rois) 235 behavior_session = BehaviorSession.from_nwb(nwbfile=nwbfile) 236 projections = Projections.from_nwb(nwbfile=nwbfile) --> 237 cell_specimens = CellSpecimens.from_nwb( 238 nwbfile=nwbfile, 239 segmentation_mask_image_spacing=projections.max_projection.spacing, 240 events_params=EventsParams( 241 filter_scale_seconds=events_filter_scale_seconds, 242 filter_n_time_steps=events_filter_n_time_steps 243 ), 244 exclude_invalid_rois=exclude_invalid_rois 245 ) 246 motion_correction = MotionCorrection.from_nwb(nwbfile=nwbfile) 247 is_multiplane_session = _is_multi_plane_session() File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/data_objects/cell_specimens/cell_specimens.py:611, in CellSpecimens.from_nwb(cls, nwbfile, segmentation_mask_image_spacing, events_params, exclude_invalid_rois) 609 meta = CellSpecimenMeta.from_nwb(nwbfile=nwbfile) 610 dff_traces = DFFTraces.from_nwb(nwbfile=nwbfile) --> 611 demixed_traces = DemixedTraces.from_nwb(nwbfile=nwbfile) 612 neuropil_traces = NeuropilTraces.from_nwb(nwbfile=nwbfile) 613 corrected_fluorescence_traces = CorrectedFluorescenceTraces.from_nwb( 614 nwbfile=nwbfile 615 ) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/data_objects/cell_specimens/traces/demixed_traces.py:44, in DemixedTraces.from_nwb(cls, nwbfile) 41 @classmethod 42 def from_nwb(cls, nwbfile: NWBFile) -> "DemixedTraces": 43 demixed_traces_nwb = ( ---> 44 nwbfile.processing["ophys"] 45 .data_interfaces["demixed_trace"] 46 .roi_response_series["traces"] 47 ) 48 # f traces stored as timepoints x rois in NWB 49 # We want rois x timepoints, hence the transpose 50 f_traces = demixed_traces_nwb.data[:].T.copy() File ~/.local/lib/python3.8/site-packages/hdmf/utils.py:1015, in LabelledDict.__getitem__(self, args) 1013 return super().__getitem__(val) 1014 else: -> 1015 return super().__getitem__(key) KeyError: 'demixed_trace' INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/visual_behavior_compare_across_trial_types.ipynb INFO:papermill:Output Notebook: /tmp/tmp59e0wgsb/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/60 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 2%|▏ | 1/60 [00:01<01:07, 1.15s/cell] Executing: 8%|▊ | 5/60 [00:03<00:38, 1.41cell/s] Executing: 13%|█▎ | 8/60 [00:08<00:58, 1.13s/cell] Executing: 17%|█▋ | 10/60 [00:14<01:29, 1.78s/cell] Executing: 23%|██▎ | 14/60 [00:15<00:43, 1.05cell/s] Executing: 27%|██▋ | 16/60 [00:16<00:39, 1.12cell/s] Executing: 32%|███▏ | 19/60 [00:16<00:24, 1.68cell/s] Executing: 35%|███▌ | 21/60 [00:27<00:23, 1.68cell/s] Executing: 37%|███▋ | 22/60 [01:17<04:30, 7.13s/cell] Executing: 37%|███▋ | 22/60 [01:17<02:14, 3.54s/cell] ERROR:root: --------------------------------------------------------------------------- Exception encountered at "In [11]": --------------------------------------------------------------------------- KeyError Traceback (most recent call last) Cell In [11], line 3 1 experiment_id = experiment_table.query('session_type == "OPHYS_1_images_A"').sample(random_state=10).index[0] 2 print('getting experiment data for experiment_id {}'.format(experiment_id)) ----> 3 experiment_dataset = bc.get_behavior_ophys_experiment(experiment_id) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/behavior_project_cache.py:324, in VisualBehaviorOphysProjectCache.get_behavior_ophys_experiment(self, ophys_experiment_id) 311 def get_behavior_ophys_experiment( 312 self, ophys_experiment_id: int 313 ) -> BehaviorOphysExperiment: 314 """ 315 Gets `BehaviorOphysExperiment` for `ophys_experiment_id` 316 Parameters (...) 322 BehaviorOphysExperiment 323 """ --> 324 return self.fetch_api.get_behavior_ophys_experiment( 325 ophys_experiment_id=ophys_experiment_id) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/project_apis/data_io/behavior_project_cloud_api.py:123, in BehaviorProjectCloudApi.get_behavior_ophys_experiment(self, ophys_experiment_id) 121 file_id = str(int(row[self.cache.file_id_column])) 122 data_path = self._get_data_path(file_id=file_id) --> 123 return BehaviorOphysExperiment.from_nwb_path( 124 str(data_path)) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_session.py:552, in BehaviorSession.from_nwb_path(cls, nwb_path, **kwargs) 550 with pynwb.NWBHDF5IO(nwb_path, 'r', load_namespaces=True) as read_io: 551 nwbfile = read_io.read() --> 552 return cls.from_nwb( 553 nwbfile=nwbfile, 554 **kwargs) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_ophys_experiment.py:237, in BehaviorOphysExperiment.from_nwb(cls, nwbfile, eye_tracking_z_threshold, eye_tracking_dilation_frames, events_filter_scale_seconds, events_filter_n_time_steps, exclude_invalid_rois) 235 behavior_session = BehaviorSession.from_nwb(nwbfile=nwbfile) 236 projections = Projections.from_nwb(nwbfile=nwbfile) --> 237 cell_specimens = CellSpecimens.from_nwb( 238 nwbfile=nwbfile, 239 segmentation_mask_image_spacing=projections.max_projection.spacing, 240 events_params=EventsParams( 241 filter_scale_seconds=events_filter_scale_seconds, 242 filter_n_time_steps=events_filter_n_time_steps 243 ), 244 exclude_invalid_rois=exclude_invalid_rois 245 ) 246 motion_correction = MotionCorrection.from_nwb(nwbfile=nwbfile) 247 is_multiplane_session = _is_multi_plane_session() File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/data_objects/cell_specimens/cell_specimens.py:611, in CellSpecimens.from_nwb(cls, nwbfile, segmentation_mask_image_spacing, events_params, exclude_invalid_rois) 609 meta = CellSpecimenMeta.from_nwb(nwbfile=nwbfile) 610 dff_traces = DFFTraces.from_nwb(nwbfile=nwbfile) --> 611 demixed_traces = DemixedTraces.from_nwb(nwbfile=nwbfile) 612 neuropil_traces = NeuropilTraces.from_nwb(nwbfile=nwbfile) 613 corrected_fluorescence_traces = CorrectedFluorescenceTraces.from_nwb( 614 nwbfile=nwbfile 615 ) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/data_objects/cell_specimens/traces/demixed_traces.py:44, in DemixedTraces.from_nwb(cls, nwbfile) 41 @classmethod 42 def from_nwb(cls, nwbfile: NWBFile) -> "DemixedTraces": 43 demixed_traces_nwb = ( ---> 44 nwbfile.processing["ophys"] 45 .data_interfaces["demixed_trace"] 46 .roi_response_series["traces"] 47 ) 48 # f traces stored as timepoints x rois in NWB 49 # We want rois x timepoints, hence the transpose 50 f_traces = demixed_traces_nwb.data[:].T.copy() File ~/.local/lib/python3.8/site-packages/hdmf/utils.py:1015, in LabelledDict.__getitem__(self, args) 1013 return super().__getitem__(val) 1014 else: -> 1015 return super().__getitem__(key) KeyError: 'demixed_trace' INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/visual_behavior_load_ophys_data.ipynb INFO:papermill:Output Notebook: /tmp/tmpaem9bne2/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/89 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 1%| | 1/89 [00:01<01:42, 1.16s/cell] Executing: 7%|▋ | 6/89 [00:03<00:48, 1.73cell/s] Executing: 10%|█ | 9/89 [00:08<01:19, 1.00cell/s] Executing: 13%|█▎ | 12/89 [00:09<00:57, 1.34cell/s] Executing: 16%|█▌ | 14/89 [00:09<00:42, 1.77cell/s] Executing: 17%|█▋ | 15/89 [00:14<01:36, 1.31s/cell] Executing: 20%|██ | 18/89 [00:14<00:56, 1.26cell/s] Executing: 22%|██▏ | 20/89 [00:16<00:52, 1.32cell/s] Executing: 26%|██▌ | 23/89 [00:16<00:32, 2.03cell/s] Executing: 29%|██▉ | 26/89 [00:16<00:21, 2.98cell/s] Executing: 31%|███▏ | 28/89 [00:16<00:16, 3.78cell/s] Executing: 33%|███▎ | 29/89 [00:29<00:15, 3.78cell/s] Executing: 34%|███▎ | 30/89 [00:30<01:59, 2.02s/cell] Executing: 34%|███▎ | 30/89 [00:31<01:01, 1.04s/cell] ERROR:root: --------------------------------------------------------------------------- Exception encountered at "In [13]": --------------------------------------------------------------------------- KeyError Traceback (most recent call last) Cell In [13], line 4 1 # select first experiment from the table to look at in more detail. 2 # Note that python enumeration starts at 0. 3 ophys_experiment_id = selected_experiment_table.index[0] ----> 4 dataset = bc.get_behavior_ophys_experiment(ophys_experiment_id) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/behavior_project_cache.py:324, in VisualBehaviorOphysProjectCache.get_behavior_ophys_experiment(self, ophys_experiment_id) 311 def get_behavior_ophys_experiment( 312 self, ophys_experiment_id: int 313 ) -> BehaviorOphysExperiment: 314 """ 315 Gets `BehaviorOphysExperiment` for `ophys_experiment_id` 316 Parameters (...) 322 BehaviorOphysExperiment 323 """ --> 324 return self.fetch_api.get_behavior_ophys_experiment( 325 ophys_experiment_id=ophys_experiment_id) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/project_apis/data_io/behavior_project_cloud_api.py:123, in BehaviorProjectCloudApi.get_behavior_ophys_experiment(self, ophys_experiment_id) 121 file_id = str(int(row[self.cache.file_id_column])) 122 data_path = self._get_data_path(file_id=file_id) --> 123 return BehaviorOphysExperiment.from_nwb_path( 124 str(data_path)) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_session.py:552, in BehaviorSession.from_nwb_path(cls, nwb_path, **kwargs) 550 with pynwb.NWBHDF5IO(nwb_path, 'r', load_namespaces=True) as read_io: 551 nwbfile = read_io.read() --> 552 return cls.from_nwb( 553 nwbfile=nwbfile, 554 **kwargs) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_ophys_experiment.py:237, in BehaviorOphysExperiment.from_nwb(cls, nwbfile, eye_tracking_z_threshold, eye_tracking_dilation_frames, events_filter_scale_seconds, events_filter_n_time_steps, exclude_invalid_rois) 235 behavior_session = BehaviorSession.from_nwb(nwbfile=nwbfile) 236 projections = Projections.from_nwb(nwbfile=nwbfile) --> 237 cell_specimens = CellSpecimens.from_nwb( 238 nwbfile=nwbfile, 239 segmentation_mask_image_spacing=projections.max_projection.spacing, 240 events_params=EventsParams( 241 filter_scale_seconds=events_filter_scale_seconds, 242 filter_n_time_steps=events_filter_n_time_steps 243 ), 244 exclude_invalid_rois=exclude_invalid_rois 245 ) 246 motion_correction = MotionCorrection.from_nwb(nwbfile=nwbfile) 247 is_multiplane_session = _is_multi_plane_session() File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/data_objects/cell_specimens/cell_specimens.py:611, in CellSpecimens.from_nwb(cls, nwbfile, segmentation_mask_image_spacing, events_params, exclude_invalid_rois) 609 meta = CellSpecimenMeta.from_nwb(nwbfile=nwbfile) 610 dff_traces = DFFTraces.from_nwb(nwbfile=nwbfile) --> 611 demixed_traces = DemixedTraces.from_nwb(nwbfile=nwbfile) 612 neuropil_traces = NeuropilTraces.from_nwb(nwbfile=nwbfile) 613 corrected_fluorescence_traces = CorrectedFluorescenceTraces.from_nwb( 614 nwbfile=nwbfile 615 ) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/data_objects/cell_specimens/traces/demixed_traces.py:44, in DemixedTraces.from_nwb(cls, nwbfile) 41 @classmethod 42 def from_nwb(cls, nwbfile: NWBFile) -> "DemixedTraces": 43 demixed_traces_nwb = ( ---> 44 nwbfile.processing["ophys"] 45 .data_interfaces["demixed_trace"] 46 .roi_response_series["traces"] 47 ) 48 # f traces stored as timepoints x rois in NWB 49 # We want rois x timepoints, hence the transpose 50 f_traces = demixed_traces_nwb.data[:].T.copy() File ~/.local/lib/python3.8/site-packages/hdmf/utils.py:1015, in LabelledDict.__getitem__(self, args) 1013 return super().__getitem__(val) 1014 else: -> 1015 return super().__getitem__(key) KeyError: 'demixed_trace' INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/visual_behavior_mouse_history.ipynb INFO:papermill:Output Notebook: /tmp/tmpb66hyqme/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/61 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 2%|▏ | 1/61 [00:01<01:09, 1.15s/cell] Executing: 7%|▋ | 4/61 [00:03<00:51, 1.11cell/s] Executing: 11%|█▏ | 7/61 [00:08<01:07, 1.24s/cell] Executing: 15%|█▍ | 9/61 [00:14<01:36, 1.86s/cell] Executing: 21%|██▏ | 13/61 [00:14<00:46, 1.04cell/s] Executing: 25%|██▍ | 15/61 [00:15<00:40, 1.14cell/s] Executing: 30%|██▉ | 18/61 [00:15<00:24, 1.74cell/s] Executing: 34%|███▍ | 21/61 [00:16<00:15, 2.52cell/s] Executing: 36%|███▌ | 22/61 [00:28<00:15, 2.52cell/s] Executing: 38%|███▊ | 23/61 [06:19<28:15, 44.62s/cell] Executing: 39%|███▉ | 24/61 [06:20<23:27, 38.03s/cell] Executing: 43%|████▎ | 26/61 [06:20<15:37, 26.78s/cell] Executing: 46%|████▌ | 28/61 [06:20<10:22, 18.85s/cell] Executing: 48%|████▊ | 29/61 [06:21<08:18, 15.57s/cell] Executing: 49%|████▉ | 30/61 [06:21<06:27, 12.48s/cell] Executing: 51%|█████ | 31/61 [06:21<04:55, 9.84s/cell] Executing: 52%|█████▏ | 32/61 [06:22<03:37, 7.50s/cell] Executing: 54%|█████▍ | 33/61 [06:25<03:03, 6.56s/cell] Executing: 54%|█████▍ | 33/61 [06:29<05:30, 11.80s/cell] ERROR:root: --------------------------------------------------------------------------- Exception encountered at "In [17]": --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In [17], line 1 ----> 1 dataset.stimulus_presentations.head(5) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_session.py:1037, in BehaviorSession.stimulus_presentations(self) 1035 table = table.drop(columns=['image_set', 'index'], errors='ignore') 1036 table = table.rename(columns={'stop_time': 'end_time'}) -> 1037 table['trials_id'] = compute_trials_id_for_stimulus(table, 1038 self.trials) 1039 return table File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/stimulus_processing.py:655, in compute_trials_id_for_stimulus(stim_pres_table, trials_table) 647 active_sorted[stim_mask] = True 649 # The code below finds all stimulus blocks that contain images/trials 650 # and attempts to detect blocks that are identical to copy the associated 651 # trials_ids into those blocks. In the parlance of the data this is 652 # copying the active stimulus block data into the passive stimulus block. 653 654 # Get the block ids for the behavior trial presentations --> 655 stim_blocks = stim_pres_sorted.stimulus_block 656 stim_image_names = stim_pres_sorted.image_name 657 active_stim_blocks = stim_blocks[active_sorted].unique() File ~/.local/lib/python3.8/site-packages/pandas/core/generic.py:5902, in NDFrame.__getattr__(self, name) 5895 if ( 5896 name not in self._internal_names_set 5897 and name not in self._metadata 5898 and name not in self._accessors 5899 and self._info_axis._can_hold_identifiers_and_holds_name(name) 5900 ): 5901 return self[name] -> 5902 return object.__getattribute__(self, name) AttributeError: 'DataFrame' object has no attribute 'stimulus_block' INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/ecephys_data_access.ipynb INFO:papermill:Output Notebook: /tmp/tmpuuj8qhck/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/47 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 2%|▏ | 1/47 [00:01<01:18, 1.70s/cell] Executing: 9%|▊ | 4/47 [00:12<02:15, 3.15s/cell] Executing: 19%|█▉ | 9/47 [00:12<00:41, 1.09s/cell] Executing: 23%|██▎ | 11/47 [00:28<00:39, 1.09s/cell] Executing: 26%|██▌ | 12/47 [03:13<13:08, 22.53s/cell] Executing: 34%|███▍ | 16/47 [03:15<06:57, 13.48s/cell] Executing: 38%|███▊ | 18/47 [03:16<05:06, 10.55s/cell] Executing: 43%|████▎ | 20/47 [03:16<03:38, 8.09s/cell] Executing: 47%|████▋ | 22/47 [03:17<02:33, 6.13s/cell] Executing: 51%|█████ | 24/47 [06:11<10:40, 27.84s/cell] Executing: 55%|█████▌ | 26/47 [06:16<07:17, 20.84s/cell] Executing: 62%|██████▏ | 29/47 [07:22<06:21, 21.21s/cell] Executing: 66%|██████▌ | 31/47 [09:34<08:47, 33.00s/cell] Executing: 68%|██████▊ | 32/47 [09:34<06:57, 27.81s/cell] Executing: 70%|███████ | 33/47 [09:34<05:18, 22.72s/cell] Executing: 72%|███████▏ | 34/47 [09:35<03:54, 18.07s/cell] Executing: 74%|███████▍ | 35/47 [09:35<02:47, 13.96s/cell] Executing: 77%|███████▋ | 36/47 [09:35<01:55, 10.54s/cell] Executing: 79%|███████▊ | 37/47 [09:35<01:18, 7.86s/cell] Executing: 81%|████████ | 38/47 [09:35<00:51, 5.76s/cell] Executing: 83%|████████▎ | 39/47 [09:35<00:33, 4.19s/cell] Executing: 85%|████████▌ | 40/47 [09:35<00:21, 3.03s/cell] Executing: 87%|████████▋ | 41/47 [09:36<00:13, 2.20s/cell] Executing: 89%|████████▉ | 42/47 [09:40<00:14, 2.98s/cell] Executing: 91%|█████████▏| 43/47 [09:46<00:14, 3.61s/cell] Executing: 94%|█████████▎| 44/47 [09:46<00:07, 2.58s/cell] Executing: 96%|█████████▌| 45/47 [09:46<00:03, 1.85s/cell] Executing: 98%|█████████▊| 46/47 [09:46<00:01, 1.34s/cell] Executing: 100%|██████████| 47/47 [10:07<00:00, 7.31s/cell] Executing: 100%|██████████| 47/47 [10:10<00:00, 12.99s/cell] INFO:root:Executing notebook succeeded. Overwriting with new notebook output. Moving /tmp/tmpuuj8qhck/scratch_nb.ipynb to doc_template/examples_root/examples/nb/ecephys_data_access.ipynb INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/ecephys_quality_metrics.ipynb INFO:papermill:Output Notebook: /tmp/tmpk4u211yz/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/63 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 2%|▏ | 1/63 [00:01<01:45, 1.70s/cell] Executing: 8%|▊ | 5/63 [00:12<02:31, 2.61s/cell] Executing: 13%|█▎ | 8/63 [03:14<27:44, 30.27s/cell] Executing: 17%|█▋ | 11/63 [03:15<15:43, 18.14s/cell] Executing: 25%|██▌ | 16/63 [03:15<07:15, 9.26s/cell] Executing: 29%|██▊ | 18/63 [03:16<05:26, 7.26s/cell] Executing: 32%|███▏ | 20/63 [03:16<03:58, 5.55s/cell] Executing: 35%|███▍ | 22/63 [03:16<02:51, 4.18s/cell] Executing: 41%|████▏ | 26/63 [03:16<01:30, 2.45s/cell] Executing: 48%|████▊ | 30/63 [03:17<00:50, 1.54s/cell] Executing: 51%|█████ | 32/63 [03:17<00:38, 1.24s/cell] Executing: 57%|█████▋ | 36/63 [03:17<00:21, 1.27cell/s] Executing: 62%|██████▏ | 39/63 [03:17<00:14, 1.70cell/s] Executing: 65%|██████▌ | 41/63 [03:17<00:10, 2.03cell/s] Executing: 71%|███████▏ | 45/63 [03:18<00:05, 3.16cell/s] Executing: 76%|███████▌ | 48/63 [03:18<00:03, 3.95cell/s] Executing: 81%|████████ | 51/63 [03:18<00:02, 4.49cell/s] Executing: 87%|████████▋ | 55/63 [03:19<00:01, 5.74cell/s] Executing: 94%|█████████▎| 59/63 [03:19<00:00, 6.95cell/s] Executing: 98%|█████████▊| 62/63 [03:19<00:00, 8.68cell/s] Executing: 100%|██████████| 63/63 [03:21<00:00, 3.19s/cell] INFO:root:Executing notebook succeeded. Overwriting with new notebook output. Moving /tmp/tmpk4u211yz/scratch_nb.ipynb to doc_template/examples_root/examples/nb/ecephys_quality_metrics.ipynb INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/reference_space.ipynb INFO:papermill:Output Notebook: /tmp/tmpt3hz8bh_/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted WARNING:papermill:Input notebook does not contain a cell with tag 'parameters' Executing: 0%| | 0/35 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 3%|▎ | 1/35 [00:01<00:40, 1.19s/cell] Executing: 11%|█▏ | 4/35 [00:03<00:27, 1.14cell/s] Executing: 11%|█▏ | 4/35 [00:04<00:31, 1.00s/cell] ERROR:root: --------------------------------------------------------------------------- Exception encountered at "In [2]": --------------------------------------------------------------------------- ManifestVersionError Traceback (most recent call last) File ~/work/AllenSDK/AllenSDK/allensdk/api/warehouse_cache/cache.py:152, in Cache.load_manifest(self, file_name, version) 151 try: --> 152 self.manifest = Manifest( 153 ju.read(file_name)['manifest'], 154 os.path.dirname(file_name), 155 version=version) 156 except ManifestVersionError as e: File ~/work/AllenSDK/AllenSDK/allensdk/config/manifest.py:76, in Manifest.__init__(self, config, relative_base_dir, version) 75 if config is not None: ---> 76 self.load_config(config, version=version) File ~/work/AllenSDK/AllenSDK/allensdk/config/manifest.py:128, in Manifest.load_config(self, config, version) 127 if found_version != version: --> 128 raise ManifestVersionError("", version, found_version) 129 self.version = version ManifestVersionError: During handling of the above exception, another exception occurred: ManifestVersionError Traceback (most recent call last) Cell In [2], line 5 3 reference_space_key = 'annotation/ccf_2017' 4 resolution = 25 ----> 5 rspc = ReferenceSpaceCache(resolution, reference_space_key, manifest='manifest.json') 6 # ID 1 is the adult mouse structure graph 7 tree = rspc.get_structure_tree(structure_graph_id=1) File ~/work/AllenSDK/AllenSDK/allensdk/core/reference_space_cache.py:70, in ReferenceSpaceCache.__init__(self, resolution, reference_space_key, **kwargs) 67 if not 'base_uri' in kwargs: 68 kwargs['base_uri'] = None ---> 70 super(ReferenceSpaceCache, self).__init__(**kwargs) 72 self.resolution = resolution 73 self.reference_space_key = reference_space_key File ~/work/AllenSDK/AllenSDK/allensdk/api/warehouse_cache/cache.py:105, in Cache.__init__(self, manifest, cache, version, **kwargs) 103 if version is None and hasattr(self, 'MANIFEST_VERSION'): 104 version = self.MANIFEST_VERSION --> 105 self.load_manifest(manifest, version) File ~/work/AllenSDK/AllenSDK/allensdk/api/warehouse_cache/cache.py:165, in Cache.load_manifest(self, file_name, version) 162 intro = "version did not match the expected version" 164 ref_url = "https://github.com/alleninstitute/allensdk/wiki" --> 165 raise ManifestVersionError(("Your manifest file (%s) %s" + 166 " (its version is '%s', but" + 167 " version '%s' is expected). " + 168 " Please remove this file" + 169 " and it will be regenerated for" + 170 " you the next time you" + 171 " instantiate this class." + 172 " WARNING: There may be new data" + 173 " files available that replace" + 174 " the ones you already have" + 175 " downloaded. Read the notes" + 176 " for this release for more" + 177 " details on what has changed" + 178 " (%s).") % 179 (file_name, intro, 180 e.found_version, e.version, 181 ref_url), 182 e.version, e.found_version) 184 self.manifest_path = file_name 186 else: ManifestVersionError: Your manifest file (manifest.json) was made with a newer version of the AllenSDK (its version is '1.3', but version '1.2' is expected). Please remove this file and it will be regenerated for you the next time you instantiate this class. WARNING: There may be new data files available that replace the ones you already have downloaded. Read the notes for this release for more details on what has changed (https://github.com/alleninstitute/allensdk/wiki). INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/brain_observatory_analysis.ipynb INFO:papermill:Output Notebook: /tmp/tmpv_emhn_0/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/32 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 3%|▎ | 1/32 [00:00<00:29, 1.05cell/s] Executing: 16%|█▌ | 5/32 [00:03<00:20, 1.30cell/s] Executing: 22%|██▏ | 7/32 [00:13<00:56, 2.25s/cell] Executing: 34%|███▍ | 11/32 [00:44<01:46, 5.08s/cell] Executing: 41%|████ | 13/32 [00:51<01:30, 4.77s/cell] Executing: 56%|█████▋ | 18/32 [00:52<00:34, 2.44s/cell] Executing: 69%|██████▉ | 22/32 [00:53<00:16, 1.67s/cell] Executing: 75%|███████▌ | 24/32 [00:58<00:14, 1.82s/cell] Executing: 78%|███████▊ | 25/32 [05:30<04:14, 36.31s/cell] Executing: 88%|████████▊ | 28/32 [10:08<03:44, 56.21s/cell] Executing: 94%|█████████▍| 30/32 [15:25<02:43, 81.90s/cell] Executing: 100%|██████████| 32/32 [15:26<00:00, 28.95s/cell] INFO:root:Executing notebook succeeded. Overwriting with new notebook output. Moving /tmp/tmpv_emhn_0/scratch_nb.ipynb to doc_template/examples_root/examples/nb/brain_observatory_analysis.ipynb INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/receptive_fields.ipynb INFO:papermill:Output Notebook: /tmp/tmpy2ht_j15/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/28 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 4%|▎ | 1/28 [00:01<00:30, 1.13s/cell] Executing: 7%|▋ | 2/28 [00:03<00:51, 1.98s/cell] Executing: 21%|██▏ | 6/28 [05:22<22:40, 61.86s/cell] Executing: 29%|██▊ | 8/28 [07:52<22:12, 66.63s/cell] Executing: 36%|███▌ | 10/28 [07:53<13:16, 44.24s/cell] Executing: 43%|████▎ | 12/28 [07:53<07:58, 29.92s/cell] Executing: 50%|█████ | 14/28 [07:53<04:46, 20.47s/cell] Executing: 57%|█████▋ | 16/28 [07:53<02:49, 14.13s/cell] Executing: 64%|██████▍ | 18/28 [07:54<01:38, 9.81s/cell] Executing: 71%|███████▏ | 20/28 [07:54<00:54, 6.84s/cell] Executing: 79%|███████▊ | 22/28 [07:59<00:33, 5.63s/cell] Executing: 86%|████████▌ | 24/28 [08:13<00:24, 6.00s/cell] Executing: 93%|█████████▎| 26/28 [09:48<00:36, 18.48s/cell] Executing: 96%|█████████▋| 27/28 [09:48<00:15, 15.23s/cell] Executing: 100%|██████████| 28/28 [09:48<00:00, 12.19s/cell] Executing: 100%|██████████| 28/28 [09:49<00:00, 21.05s/cell] INFO:root:Executing notebook succeeded. Overwriting with new notebook output. Moving /tmp/tmpy2ht_j15/scratch_nb.ipynb to doc_template/examples_root/examples/nb/receptive_fields.ipynb INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/aligning_behavioral_data_to_task_events_with_the_stimulus_and_trials_tables.ipynb INFO:papermill:Output Notebook: /tmp/tmpt58pq64u/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/50 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 2%|▏ | 1/50 [00:01<00:54, 1.11s/cell] Executing: 6%|▌ | 3/50 [00:07<02:00, 2.57s/cell] Executing: 14%|█▍ | 7/50 [00:14<01:31, 2.13s/cell] Executing: 24%|██▍ | 12/50 [01:48<07:04, 11.18s/cell] Executing: 24%|██▍ | 12/50 [01:49<05:45, 9.09s/cell] ERROR:root: --------------------------------------------------------------------------- Exception encountered at "In [5]": --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In [5], line 1 ----> 1 session = cache.get_ecephys_session( 2 ecephys_session_id=1065437523) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/behavior_neuropixels_project_cache.py:149, in VisualBehaviorNeuropixelsProjectCache.get_ecephys_session(self, ecephys_session_id) 129 def get_ecephys_session( 130 self, 131 ecephys_session_id: int 132 ) -> BehaviorEcephysSession: 133 """ 134 Loads all data for `ecephys_session_id` into an 135 `allensdk.ecephys.behavior_ecephys_session.BehaviorEcephysSession` (...) 147 148 """ --> 149 return self.fetch_api.get_ecephys_session(ecephys_session_id) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/project_apis/data_io/behavior_neuropixels_project_cloud_api.py:114, in VisualBehaviorNeuropixelsProjectCloudApi.get_ecephys_session(self, ecephys_session_id) 111 return f 113 if not probes_meta.empty: --> 114 probe_data_path_map = { 115 p.name: make_lazy_load_filepath_function( 116 file_id=str(int(getattr(p, self.cache.file_id_column))) 117 ) for p in probes_meta.itertuples(index=False)} 118 else: 119 probe_data_path_map = None File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/project_apis/data_io/behavior_neuropixels_project_cloud_api.py:116, in <dictcomp>(.0) 111 return f 113 if not probes_meta.empty: 114 probe_data_path_map = { 115 p.name: make_lazy_load_filepath_function( --> 116 file_id=str(int(getattr(p, self.cache.file_id_column))) 117 ) for p in probes_meta.itertuples(index=False)} 118 else: 119 probe_data_path_map = None AttributeError: 'Pandas' object has no attribute 'file_id' INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/cell_types.ipynb INFO:papermill:Output Notebook: /tmp/tmp08qsc4ea/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted WARNING:papermill:Input notebook does not contain a cell with tag 'parameters' Executing: 0%| | 0/37 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 3%|▎ | 1/37 [00:01<00:38, 1.06s/cell] Executing: 14%|█▎ | 5/37 [00:03<00:23, 1.36cell/s] Executing: 14%|█▎ | 5/37 [00:04<00:27, 1.16cell/s] ERROR:root: --------------------------------------------------------------------------- Exception encountered at "In [4]": --------------------------------------------------------------------------- ManifestVersionError Traceback (most recent call last) File ~/work/AllenSDK/AllenSDK/allensdk/api/warehouse_cache/cache.py:152, in Cache.load_manifest(self, file_name, version) 151 try: --> 152 self.manifest = Manifest( 153 ju.read(file_name)['manifest'], 154 os.path.dirname(file_name), 155 version=version) 156 except ManifestVersionError as e: File ~/work/AllenSDK/AllenSDK/allensdk/config/manifest.py:76, in Manifest.__init__(self, config, relative_base_dir, version) 75 if config is not None: ---> 76 self.load_config(config, version=version) File ~/work/AllenSDK/AllenSDK/allensdk/config/manifest.py:128, in Manifest.load_config(self, config, version) 127 if found_version != version: --> 128 raise ManifestVersionError("", version, found_version) 129 self.version = version ManifestVersionError: During handling of the above exception, another exception occurred: ManifestVersionError Traceback (most recent call last) Cell In [4], line 7 1 from allensdk.core.cell_types_cache import CellTypesCache 3 # Instantiate the CellTypesCache instance. The manifest_file argument 4 # tells it where to store the manifest, which is a JSON file that tracks 5 # file paths. If you supply a relative path it will go into your 6 # current working directory ----> 7 ctc = CellTypesCache(manifest_file=Path(output_dir) / 'manifest.json') 9 # this saves the NWB file to 'cell_types/specimen_464212183/ephys.nwb' 10 cell_specimen_id = 464212183 File ~/work/AllenSDK/AllenSDK/allensdk/core/cell_types_cache.py:93, in CellTypesCache.__init__(self, cache, manifest_file, base_uri) 90 if manifest_file is None: 91 manifest_file = get_default_manifest_file('cell_types') ---> 93 super(CellTypesCache, self).__init__( 94 manifest=manifest_file, cache=cache, version=self.MANIFEST_VERSION) 95 self.api = CellTypesApi(base_uri=base_uri) File ~/work/AllenSDK/AllenSDK/allensdk/api/warehouse_cache/cache.py:105, in Cache.__init__(self, manifest, cache, version, **kwargs) 103 if version is None and hasattr(self, 'MANIFEST_VERSION'): 104 version = self.MANIFEST_VERSION --> 105 self.load_manifest(manifest, version) File ~/work/AllenSDK/AllenSDK/allensdk/api/warehouse_cache/cache.py:165, in Cache.load_manifest(self, file_name, version) 162 intro = "version did not match the expected version" 164 ref_url = "https://github.com/alleninstitute/allensdk/wiki" --> 165 raise ManifestVersionError(("Your manifest file (%s) %s" + 166 " (its version is '%s', but" + 167 " version '%s' is expected). " + 168 " Please remove this file" + 169 " and it will be regenerated for" + 170 " you the next time you" + 171 " instantiate this class." + 172 " WARNING: There may be new data" + 173 " files available that replace" + 174 " the ones you already have" + 175 " downloaded. Read the notes" + 176 " for this release for more" + 177 " details on what has changed" + 178 " (%s).") % 179 (file_name, intro, 180 e.found_version, e.version, 181 ref_url), 182 e.version, e.found_version) 184 self.manifest_path = file_name 186 else: ManifestVersionError: Your manifest file (manifest.json) version did not match the expected version (its version is '1.3', but version '1.1' is expected). Please remove this file and it will be regenerated for you the next time you instantiate this class. WARNING: There may be new data files available that replace the ones you already have downloaded. Read the notes for this release for more details on what has changed (https://github.com/alleninstitute/allensdk/wiki). INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/download_data_via_api.ipynb INFO:papermill:Output Notebook: /tmp/tmpiiylf7o4/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/29 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 3%|▎ | 1/29 [00:01<00:34, 1.23s/cell] Executing: 14%|█▍ | 4/29 [00:03<00:20, 1.20cell/s] Executing: 24%|██▍ | 7/29 [00:03<00:09, 2.44cell/s] Executing: 31%|███ | 9/29 [00:03<00:06, 3.32cell/s] Executing: 38%|███▊ | 11/29 [00:03<00:03, 4.55cell/s] Executing: 48%|████▊ | 14/29 [00:04<00:03, 4.48cell/s] Executing: 55%|█████▌ | 16/29 [00:05<00:02, 4.47cell/s] Executing: 86%|████████▌ | 25/29 [00:05<00:00, 11.47cell/s] Executing: 100%|██████████| 29/29 [00:05<00:00, 9.58cell/s] Executing: 100%|██████████| 29/29 [00:06<00:00, 4.75cell/s] INFO:root:Executing notebook succeeded. Overwriting with new notebook output. Moving /tmp/tmpiiylf7o4/scratch_nb.ipynb to doc_template/examples_root/examples/nb/download_data_via_api.ipynb INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/ecephys_session.ipynb INFO:papermill:Output Notebook: /tmp/tmpf_r4cv8j/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/85 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 1%| | 1/85 [00:01<01:37, 1.16s/cell] Executing: 2%|▏ | 2/85 [00:10<08:00, 5.78s/cell] Executing: 6%|▌ | 5/85 [00:10<02:13, 1.67s/cell] Executing: 8%|▊ | 7/85 [00:25<02:10, 1.67s/cell] Executing: 9%|▉ | 8/85 [03:10<39:59, 31.16s/cell] Executing: 12%|█▏ | 10/85 [03:11<26:34, 21.26s/cell] Executing: 14%|█▍ | 12/85 [03:12<17:52, 14.69s/cell] Executing: 16%|█▋ | 14/85 [03:13<12:08, 10.27s/cell] Executing: 20%|██ | 17/85 [03:17<07:31, 6.63s/cell] Executing: 24%|██▎ | 20/85 [04:18<12:33, 11.60s/cell] Executing: 26%|██▌ | 22/85 [04:19<09:13, 8.78s/cell] Executing: 28%|██▊ | 24/85 [04:19<06:33, 6.44s/cell] Executing: 29%|██▉ | 25/85 [04:50<10:22, 10.38s/cell] Executing: 32%|███▏ | 27/85 [04:50<06:55, 7.16s/cell] Executing: 34%|███▍ | 29/85 [04:51<04:38, 4.96s/cell] Executing: 35%|███▌ | 30/85 [05:00<05:17, 5.77s/cell] Executing: 35%|███▌ | 30/85 [05:03<09:15, 10.11s/cell] ERROR:root: --------------------------------------------------------------------------- Exception encountered at "In [15]": --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In [15], line 1 ----> 1 session.stimulus_presentations.head() File ~/work/AllenSDK/AllenSDK/allensdk/core/lazy_property/lazy_property_mixin.py:13, in LazyPropertyMixin.__getattribute__(self, name) 10 def __getattribute__(self, name): 12 lazy_class = super(LazyPropertyMixin, self).__getattribute__('LazyProperty') ---> 13 curr_attr = super(LazyPropertyMixin, self).__getattribute__(name) 14 if isinstance(curr_attr, lazy_class): 15 return curr_attr.__get__(curr_attr) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/ecephys/ecephys_session.py:267, in EcephysSession.stimulus_presentations(self) 264 @property 265 def stimulus_presentations(self): 266 return self.__class__._remove_detailed_stimulus_parameters( --> 267 self._stimulus_presentations) File ~/work/AllenSDK/AllenSDK/allensdk/core/lazy_property/lazy_property_mixin.py:15, in LazyPropertyMixin.__getattribute__(self, name) 13 curr_attr = super(LazyPropertyMixin, self).__getattribute__(name) 14 if isinstance(curr_attr, lazy_class): ---> 15 return curr_attr.__get__(curr_attr) 16 else: 17 return super(LazyPropertyMixin, self).__getattribute__(name) File ~/work/AllenSDK/AllenSDK/allensdk/core/lazy_property/lazy_property.py:20, in LazyProperty.__get__(self, obj, objtype) 17 return self 19 if self.value is None: ---> 20 self.value = self.calculate() 21 return self.value File ~/work/AllenSDK/AllenSDK/allensdk/core/lazy_property/lazy_property.py:32, in LazyProperty.calculate(self) 30 result = self.api_method(*self.args, **self.kwargs) 31 for wrapper in self.wrappers: ---> 32 result = wrapper(result) 33 return result File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/ecephys/ecephys_session.py:1127, in EcephysSession._build_stimulus_presentations(self, stimulus_presentations, nonapplicable) 1124 # pandas groupby ops ignore nans, so we need a new "nonapplicable" 1125 # value that pandas does not recognize as null ... 1126 stimulus_presentations.replace("", nonapplicable, inplace=True) -> 1127 stimulus_presentations.fillna(nonapplicable, inplace=True) 1129 stimulus_presentations['duration'] = \ 1130 stimulus_presentations['stop_time'] - \ 1131 stimulus_presentations['start_time'] 1133 # TODO: database these File ~/.local/lib/python3.8/site-packages/pandas/util/_decorators.py:331, in deprecate_nonkeyword_arguments.<locals>.decorate.<locals>.wrapper(*args, **kwargs) 325 if len(args) > num_allow_args: 326 warnings.warn( 327 msg.format(arguments=_format_argument_list(allow_args)), 328 FutureWarning, 329 stacklevel=find_stack_level(), 330 ) --> 331 return func(*args, **kwargs) File ~/.local/lib/python3.8/site-packages/pandas/core/frame.py:5624, in DataFrame.fillna(self, value, method, axis, inplace, limit, downcast) 5613 @deprecate_nonkeyword_arguments(version=None, allowed_args=["self", "value"]) 5614 @doc(NDFrame.fillna, **_shared_doc_kwargs) 5615 def fillna( # type: ignore[override] (...) 5622 downcast: dict | None = None, 5623 ) -> DataFrame | None: -> 5624 return super().fillna( 5625 value=value, 5626 method=method, 5627 axis=axis, 5628 inplace=inplace, 5629 limit=limit, 5630 downcast=downcast, 5631 ) File ~/.local/lib/python3.8/site-packages/pandas/core/generic.py:6922, in NDFrame.fillna(self, value, method, axis, inplace, limit, downcast) 6919 new_data = result # type: ignore[assignment] 6920 else: -> 6922 new_data = self._mgr.fillna( 6923 value=value, limit=limit, inplace=inplace, downcast=downcast 6924 ) 6925 elif isinstance(value, ABCDataFrame) and self.ndim == 2: 6927 new_data = self.where(self.notna(), value)._mgr File ~/.local/lib/python3.8/site-packages/pandas/core/internals/managers.py:440, in BaseBlockManager.fillna(self, value, limit, inplace, downcast) 435 if _using_copy_on_write() and any( 436 not self._has_no_reference_block(i) for i in range(len(self.blocks)) 437 ): 438 self = self.copy() --> 440 return self.apply( 441 "fillna", value=value, limit=limit, inplace=inplace, downcast=downcast 442 ) File ~/.local/lib/python3.8/site-packages/pandas/core/internals/managers.py:347, in BaseBlockManager.apply(self, f, align_keys, ignore_failures, **kwargs) 345 applied = b.apply(f, **kwargs) 346 else: --> 347 applied = getattr(b, f)(**kwargs) 348 except (TypeError, NotImplementedError): 349 if not ignore_failures: File ~/.local/lib/python3.8/site-packages/pandas/core/internals/blocks.py:1584, in EABackedBlock.fillna(self, value, limit, inplace, downcast) 1579 return [res_blk] 1581 # TODO: since this now dispatches to super, which in turn dispatches 1582 # to putmask, it may *actually* respect 'inplace=True'. If so, add 1583 # tests for this. -> 1584 return super().fillna(value, limit=limit, inplace=inplace, downcast=downcast) File ~/.local/lib/python3.8/site-packages/pandas/core/internals/blocks.py:1194, in Block.fillna(self, value, limit, inplace, downcast) 1191 mask[mask.cumsum(self.ndim - 1) > limit] = False 1193 if inplace: -> 1194 nbs = self.putmask(mask.T, value) 1195 else: 1196 # without _downcast, we would break 1197 # test_fillna_dtype_conversion_equiv_replace 1198 nbs = self.where(value, ~mask.T, _downcast=False) File ~/.local/lib/python3.8/site-packages/pandas/core/internals/blocks.py:1517, in EABackedBlock.putmask(self, mask, new) 1513 return [self] 1515 try: 1516 # Caller is responsible for ensuring matching lengths -> 1517 values._putmask(mask, new) 1518 except (TypeError, ValueError) as err: 1519 _catch_deprecated_value_error(err) File ~/.local/lib/python3.8/site-packages/pandas/core/arrays/base.py:1523, in ExtensionArray._putmask(self, mask, value) 1520 else: 1521 val = value -> 1523 self[mask] = val File ~/.local/lib/python3.8/site-packages/pandas/core/arrays/masked.py:232, in BaseMaskedArray.__setitem__(self, key, value) 230 self._mask[key] = True 231 else: --> 232 value = self._validate_setitem_value(value) 233 self._data[key] = value 234 self._mask[key] = False File ~/.local/lib/python3.8/site-packages/pandas/core/arrays/masked.py:223, in BaseMaskedArray._validate_setitem_value(self, value) 218 return value 219 # TODO: unsigned checks 220 221 # Note: without the "str" here, the f-string rendering raises in 222 # py38 builds. --> 223 raise TypeError(f"Invalid value '{str(value)}' for dtype {self.dtype}") TypeError: Invalid value 'null' for dtype boolean INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/ecephys_receptive_fields.ipynb INFO:papermill:Output Notebook: /tmp/tmp5fc0m186/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/36 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 3%|▎ | 1/36 [00:01<00:58, 1.67s/cell] Executing: 6%|▌ | 2/36 [00:12<03:52, 6.84s/cell] Executing: 22%|██▏ | 8/36 [04:02<15:28, 33.17s/cell] Executing: 31%|███ | 11/36 [04:06<08:50, 21.23s/cell] Executing: 31%|███ | 11/36 [04:07<09:21, 22.47s/cell] ERROR:root: --------------------------------------------------------------------------- Exception encountered at "In [6]": --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In [6], line 1 ----> 1 rf_stim_table = session.stimulus_presentations[session.stimulus_presentations.stimulus_name == 'gabors'] 3 len(rf_stim_table) File ~/work/AllenSDK/AllenSDK/allensdk/core/lazy_property/lazy_property_mixin.py:13, in LazyPropertyMixin.__getattribute__(self, name) 10 def __getattribute__(self, name): 12 lazy_class = super(LazyPropertyMixin, self).__getattribute__('LazyProperty') ---> 13 curr_attr = super(LazyPropertyMixin, self).__getattribute__(name) 14 if isinstance(curr_attr, lazy_class): 15 return curr_attr.__get__(curr_attr) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/ecephys/ecephys_session.py:267, in EcephysSession.stimulus_presentations(self) 264 @property 265 def stimulus_presentations(self): 266 return self.__class__._remove_detailed_stimulus_parameters( --> 267 self._stimulus_presentations) File ~/work/AllenSDK/AllenSDK/allensdk/core/lazy_property/lazy_property_mixin.py:15, in LazyPropertyMixin.__getattribute__(self, name) 13 curr_attr = super(LazyPropertyMixin, self).__getattribute__(name) 14 if isinstance(curr_attr, lazy_class): ---> 15 return curr_attr.__get__(curr_attr) 16 else: 17 return super(LazyPropertyMixin, self).__getattribute__(name) File ~/work/AllenSDK/AllenSDK/allensdk/core/lazy_property/lazy_property.py:20, in LazyProperty.__get__(self, obj, objtype) 17 return self 19 if self.value is None: ---> 20 self.value = self.calculate() 21 return self.value File ~/work/AllenSDK/AllenSDK/allensdk/core/lazy_property/lazy_property.py:32, in LazyProperty.calculate(self) 30 result = self.api_method(*self.args, **self.kwargs) 31 for wrapper in self.wrappers: ---> 32 result = wrapper(result) 33 return result File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/ecephys/ecephys_session.py:1127, in EcephysSession._build_stimulus_presentations(self, stimulus_presentations, nonapplicable) 1124 # pandas groupby ops ignore nans, so we need a new "nonapplicable" 1125 # value that pandas does not recognize as null ... 1126 stimulus_presentations.replace("", nonapplicable, inplace=True) -> 1127 stimulus_presentations.fillna(nonapplicable, inplace=True) 1129 stimulus_presentations['duration'] = \ 1130 stimulus_presentations['stop_time'] - \ 1131 stimulus_presentations['start_time'] 1133 # TODO: database these File ~/.local/lib/python3.8/site-packages/pandas/util/_decorators.py:331, in deprecate_nonkeyword_arguments.<locals>.decorate.<locals>.wrapper(*args, **kwargs) 325 if len(args) > num_allow_args: 326 warnings.warn( 327 msg.format(arguments=_format_argument_list(allow_args)), 328 FutureWarning, 329 stacklevel=find_stack_level(), 330 ) --> 331 return func(*args, **kwargs) File ~/.local/lib/python3.8/site-packages/pandas/core/frame.py:5624, in DataFrame.fillna(self, value, method, axis, inplace, limit, downcast) 5613 @deprecate_nonkeyword_arguments(version=None, allowed_args=["self", "value"]) 5614 @doc(NDFrame.fillna, **_shared_doc_kwargs) 5615 def fillna( # type: ignore[override] (...) 5622 downcast: dict | None = None, 5623 ) -> DataFrame | None: -> 5624 return super().fillna( 5625 value=value, 5626 method=method, 5627 axis=axis, 5628 inplace=inplace, 5629 limit=limit, 5630 downcast=downcast, 5631 ) File ~/.local/lib/python3.8/site-packages/pandas/core/generic.py:6922, in NDFrame.fillna(self, value, method, axis, inplace, limit, downcast) 6919 new_data = result # type: ignore[assignment] 6920 else: -> 6922 new_data = self._mgr.fillna( 6923 value=value, limit=limit, inplace=inplace, downcast=downcast 6924 ) 6925 elif isinstance(value, ABCDataFrame) and self.ndim == 2: 6927 new_data = self.where(self.notna(), value)._mgr File ~/.local/lib/python3.8/site-packages/pandas/core/internals/managers.py:440, in BaseBlockManager.fillna(self, value, limit, inplace, downcast) 435 if _using_copy_on_write() and any( 436 not self._has_no_reference_block(i) for i in range(len(self.blocks)) 437 ): 438 self = self.copy() --> 440 return self.apply( 441 "fillna", value=value, limit=limit, inplace=inplace, downcast=downcast 442 ) File ~/.local/lib/python3.8/site-packages/pandas/core/internals/managers.py:347, in BaseBlockManager.apply(self, f, align_keys, ignore_failures, **kwargs) 345 applied = b.apply(f, **kwargs) 346 else: --> 347 applied = getattr(b, f)(**kwargs) 348 except (TypeError, NotImplementedError): 349 if not ignore_failures: File ~/.local/lib/python3.8/site-packages/pandas/core/internals/blocks.py:1584, in EABackedBlock.fillna(self, value, limit, inplace, downcast) 1579 return [res_blk] 1581 # TODO: since this now dispatches to super, which in turn dispatches 1582 # to putmask, it may *actually* respect 'inplace=True'. If so, add 1583 # tests for this. -> 1584 return super().fillna(value, limit=limit, inplace=inplace, downcast=downcast) File ~/.local/lib/python3.8/site-packages/pandas/core/internals/blocks.py:1194, in Block.fillna(self, value, limit, inplace, downcast) 1191 mask[mask.cumsum(self.ndim - 1) > limit] = False 1193 if inplace: -> 1194 nbs = self.putmask(mask.T, value) 1195 else: 1196 # without _downcast, we would break 1197 # test_fillna_dtype_conversion_equiv_replace 1198 nbs = self.where(value, ~mask.T, _downcast=False) File ~/.local/lib/python3.8/site-packages/pandas/core/internals/blocks.py:1517, in EABackedBlock.putmask(self, mask, new) 1513 return [self] 1515 try: 1516 # Caller is responsible for ensuring matching lengths -> 1517 values._putmask(mask, new) 1518 except (TypeError, ValueError) as err: 1519 _catch_deprecated_value_error(err) File ~/.local/lib/python3.8/site-packages/pandas/core/arrays/base.py:1523, in ExtensionArray._putmask(self, mask, value) 1520 else: 1521 val = value -> 1523 self[mask] = val File ~/.local/lib/python3.8/site-packages/pandas/core/arrays/masked.py:232, in BaseMaskedArray.__setitem__(self, key, value) 230 self._mask[key] = True 231 else: --> 232 value = self._validate_setitem_value(value) 233 self._data[key] = value 234 self._mask[key] = False File ~/.local/lib/python3.8/site-packages/pandas/core/arrays/masked.py:223, in BaseMaskedArray._validate_setitem_value(self, value) 218 return value 219 # TODO: unsigned checks 220 221 # Note: without the "str" here, the f-string rendering raises in 222 # py38 builds. --> 223 raise TypeError(f"Invalid value '{str(value)}' for dtype {self.dtype}") TypeError: Invalid value 'null' for dtype boolean INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/ecephys_lfp_analysis.ipynb INFO:papermill:Output Notebook: /tmp/tmptfj1smg2/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/67 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 1%|▏ | 1/67 [00:01<01:20, 1.23s/cell] Executing: 4%|▍ | 3/67 [00:09<03:41, 3.46s/cell] Executing: 12%|█▏ | 8/67 [00:09<00:56, 1.04cell/s] Executing: 12%|█▏ | 8/67 [00:24<00:56, 1.04cell/s] Executing: 13%|█▎ | 9/67 [04:20<42:24, 43.86s/cell] Executing: 16%|█▋ | 11/67 [04:20<27:29, 29.45s/cell] Executing: 19%|█▉ | 13/67 [04:21<18:07, 20.14s/cell] Executing: 22%|██▏ | 15/67 [04:22<12:09, 14.03s/cell] Executing: 24%|██▍ | 16/67 [04:25<10:06, 11.88s/cell] Executing: 27%|██▋ | 18/67 [04:25<06:25, 7.88s/cell] Executing: 30%|██▉ | 20/67 [04:25<04:09, 5.31s/cell] Executing: 33%|███▎ | 22/67 [04:25<02:43, 3.64s/cell] Executing: 36%|███▌ | 24/67 [04:25<01:48, 2.52s/cell] Executing: 37%|███▋ | 25/67 [04:44<01:46, 2.52s/cell] Executing: 39%|███▉ | 26/67 [07:22<19:51, 29.07s/cell] Executing: 40%|████ | 27/67 [07:22<15:53, 23.84s/cell] Executing: 42%|████▏ | 28/67 [07:23<12:26, 19.15s/cell] Executing: 43%|████▎ | 29/67 [07:23<09:23, 14.84s/cell] Executing: 45%|████▍ | 30/67 [07:25<07:12, 11.70s/cell] Executing: 46%|████▋ | 31/67 [07:26<05:13, 8.70s/cell] Executing: 48%|████▊ | 32/67 [07:28<04:01, 6.91s/cell] Executing: 49%|████▉ | 33/67 [07:28<02:50, 5.02s/cell] Executing: 51%|█████ | 34/67 [07:30<02:17, 4.15s/cell] Executing: 52%|█████▏ | 35/67 [07:30<01:35, 3.00s/cell] Executing: 54%|█████▎ | 36/67 [07:31<01:15, 2.44s/cell] Executing: 55%|█████▌ | 37/67 [07:31<00:53, 1.77s/cell] Executing: 57%|█████▋ | 38/67 [07:31<00:37, 1.29s/cell] Executing: 58%|█████▊ | 39/67 [07:31<00:26, 1.06cell/s] Executing: 60%|█████▉ | 40/67 [07:45<02:10, 4.85s/cell] Executing: 60%|█████▉ | 40/67 [07:49<05:16, 11.73s/cell] ERROR:root: --------------------------------------------------------------------------- Exception encountered at "In [18]": --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In [18], line 1 ----> 1 presentation_table = session.stimulus_presentations[session.stimulus_presentations.stimulus_name == 'flashes'] 3 presentation_times = presentation_table.start_time.values 4 presentation_ids = presentation_table.index.values File ~/work/AllenSDK/AllenSDK/allensdk/core/lazy_property/lazy_property_mixin.py:13, in LazyPropertyMixin.__getattribute__(self, name) 10 def __getattribute__(self, name): 12 lazy_class = super(LazyPropertyMixin, self).__getattribute__('LazyProperty') ---> 13 curr_attr = super(LazyPropertyMixin, self).__getattribute__(name) 14 if isinstance(curr_attr, lazy_class): 15 return curr_attr.__get__(curr_attr) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/ecephys/ecephys_session.py:267, in EcephysSession.stimulus_presentations(self) 264 @property 265 def stimulus_presentations(self): 266 return self.__class__._remove_detailed_stimulus_parameters( --> 267 self._stimulus_presentations) File ~/work/AllenSDK/AllenSDK/allensdk/core/lazy_property/lazy_property_mixin.py:15, in LazyPropertyMixin.__getattribute__(self, name) 13 curr_attr = super(LazyPropertyMixin, self).__getattribute__(name) 14 if isinstance(curr_attr, lazy_class): ---> 15 return curr_attr.__get__(curr_attr) 16 else: 17 return super(LazyPropertyMixin, self).__getattribute__(name) File ~/work/AllenSDK/AllenSDK/allensdk/core/lazy_property/lazy_property.py:20, in LazyProperty.__get__(self, obj, objtype) 17 return self 19 if self.value is None: ---> 20 self.value = self.calculate() 21 return self.value File ~/work/AllenSDK/AllenSDK/allensdk/core/lazy_property/lazy_property.py:32, in LazyProperty.calculate(self) 30 result = self.api_method(*self.args, **self.kwargs) 31 for wrapper in self.wrappers: ---> 32 result = wrapper(result) 33 return result File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/ecephys/ecephys_session.py:1127, in EcephysSession._build_stimulus_presentations(self, stimulus_presentations, nonapplicable) 1124 # pandas groupby ops ignore nans, so we need a new "nonapplicable" 1125 # value that pandas does not recognize as null ... 1126 stimulus_presentations.replace("", nonapplicable, inplace=True) -> 1127 stimulus_presentations.fillna(nonapplicable, inplace=True) 1129 stimulus_presentations['duration'] = \ 1130 stimulus_presentations['stop_time'] - \ 1131 stimulus_presentations['start_time'] 1133 # TODO: database these File ~/.local/lib/python3.8/site-packages/pandas/util/_decorators.py:331, in deprecate_nonkeyword_arguments.<locals>.decorate.<locals>.wrapper(*args, **kwargs) 325 if len(args) > num_allow_args: 326 warnings.warn( 327 msg.format(arguments=_format_argument_list(allow_args)), 328 FutureWarning, 329 stacklevel=find_stack_level(), 330 ) --> 331 return func(*args, **kwargs) File ~/.local/lib/python3.8/site-packages/pandas/core/frame.py:5624, in DataFrame.fillna(self, value, method, axis, inplace, limit, downcast) 5613 @deprecate_nonkeyword_arguments(version=None, allowed_args=["self", "value"]) 5614 @doc(NDFrame.fillna, **_shared_doc_kwargs) 5615 def fillna( # type: ignore[override] (...) 5622 downcast: dict | None = None, 5623 ) -> DataFrame | None: -> 5624 return super().fillna( 5625 value=value, 5626 method=method, 5627 axis=axis, 5628 inplace=inplace, 5629 limit=limit, 5630 downcast=downcast, 5631 ) File ~/.local/lib/python3.8/site-packages/pandas/core/generic.py:6922, in NDFrame.fillna(self, value, method, axis, inplace, limit, downcast) 6919 new_data = result # type: ignore[assignment] 6920 else: -> 6922 new_data = self._mgr.fillna( 6923 value=value, limit=limit, inplace=inplace, downcast=downcast 6924 ) 6925 elif isinstance(value, ABCDataFrame) and self.ndim == 2: 6927 new_data = self.where(self.notna(), value)._mgr File ~/.local/lib/python3.8/site-packages/pandas/core/internals/managers.py:440, in BaseBlockManager.fillna(self, value, limit, inplace, downcast) 435 if _using_copy_on_write() and any( 436 not self._has_no_reference_block(i) for i in range(len(self.blocks)) 437 ): 438 self = self.copy() --> 440 return self.apply( 441 "fillna", value=value, limit=limit, inplace=inplace, downcast=downcast 442 ) File ~/.local/lib/python3.8/site-packages/pandas/core/internals/managers.py:347, in BaseBlockManager.apply(self, f, align_keys, ignore_failures, **kwargs) 345 applied = b.apply(f, **kwargs) 346 else: --> 347 applied = getattr(b, f)(**kwargs) 348 except (TypeError, NotImplementedError): 349 if not ignore_failures: File ~/.local/lib/python3.8/site-packages/pandas/core/internals/blocks.py:1584, in EABackedBlock.fillna(self, value, limit, inplace, downcast) 1579 return [res_blk] 1581 # TODO: since this now dispatches to super, which in turn dispatches 1582 # to putmask, it may *actually* respect 'inplace=True'. If so, add 1583 # tests for this. -> 1584 return super().fillna(value, limit=limit, inplace=inplace, downcast=downcast) File ~/.local/lib/python3.8/site-packages/pandas/core/internals/blocks.py:1194, in Block.fillna(self, value, limit, inplace, downcast) 1191 mask[mask.cumsum(self.ndim - 1) > limit] = False 1193 if inplace: -> 1194 nbs = self.putmask(mask.T, value) 1195 else: 1196 # without _downcast, we would break 1197 # test_fillna_dtype_conversion_equiv_replace 1198 nbs = self.where(value, ~mask.T, _downcast=False) File ~/.local/lib/python3.8/site-packages/pandas/core/internals/blocks.py:1517, in EABackedBlock.putmask(self, mask, new) 1513 return [self] 1515 try: 1516 # Caller is responsible for ensuring matching lengths -> 1517 values._putmask(mask, new) 1518 except (TypeError, ValueError) as err: 1519 _catch_deprecated_value_error(err) File ~/.local/lib/python3.8/site-packages/pandas/core/arrays/base.py:1523, in ExtensionArray._putmask(self, mask, value) 1520 else: 1521 val = value -> 1523 self[mask] = val File ~/.local/lib/python3.8/site-packages/pandas/core/arrays/masked.py:232, in BaseMaskedArray.__setitem__(self, key, value) 230 self._mask[key] = True 231 else: --> 232 value = self._validate_setitem_value(value) 233 self._data[key] = value 234 self._mask[key] = False File ~/.local/lib/python3.8/site-packages/pandas/core/arrays/masked.py:223, in BaseMaskedArray._validate_setitem_value(self, value) 218 return value 219 # TODO: unsigned checks 220 221 # Note: without the "str" here, the f-string rendering raises in 222 # py38 builds. --> 223 raise TypeError(f"Invalid value '{str(value)}' for dtype {self.dtype}") TypeError: Invalid value 'null' for dtype boolean INFO:papermill:Input Notebook: doc_template/examples_root/examples/nb/visual_behavior_neuropixels_data_access.ipynb INFO:papermill:Output Notebook: /tmp/tmp2eqgc2pm/scratch_nb.ipynb WARNING:papermill.translators:Black is not installed, parameters wont be formatted Executing: 0%| | 0/65 [00:00<?, ?cell/s]INFO:papermill:Executing notebook with kernel: python3 Executing: 2%|▏ | 1/65 [00:01<01:53, 1.77s/cell] Executing: 11%|█ | 7/65 [00:04<00:37, 1.53cell/s] Executing: 15%|█▌ | 10/65 [00:09<00:55, 1.00s/cell] Executing: 18%|█▊ | 12/65 [00:17<01:38, 1.85s/cell] Executing: 23%|██▎ | 15/65 [00:17<00:59, 1.18s/cell] Executing: 26%|██▌ | 17/65 [00:26<01:32, 1.94s/cell] Executing: 28%|██▊ | 18/65 [00:27<01:26, 1.83s/cell] Executing: 34%|███▍ | 22/65 [00:27<00:42, 1.02cell/s] Executing: 38%|███▊ | 25/65 [00:27<00:26, 1.50cell/s] Executing: 43%|████▎ | 28/65 [00:27<00:17, 2.16cell/s] Executing: 48%|████▊ | 31/65 [00:30<00:19, 1.77cell/s] Executing: 51%|█████ | 33/65 [00:30<00:14, 2.21cell/s] Executing: 55%|█████▌ | 36/65 [00:30<00:09, 3.19cell/s] Executing: 58%|█████▊ | 38/65 [00:30<00:06, 3.93cell/s] Executing: 63%|██████▎ | 41/65 [00:30<00:04, 5.46cell/s] Executing: 68%|██████▊ | 44/65 [00:30<00:02, 7.25cell/s] Executing: 72%|███████▏ | 47/65 [00:30<00:01, 9.19cell/s] Executing: 77%|███████▋ | 50/65 [00:31<00:01, 10.95cell/s] Executing: 78%|███████▊ | 51/65 [00:44<00:01, 10.95cell/s] Executing: 80%|████████ | 52/65 [01:38<01:41, 7.84s/cell] Executing: 80%|████████ | 52/65 [01:41<00:25, 1.95s/cell] ERROR:root: --------------------------------------------------------------------------- Exception encountered at "In [20]": --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In [20], line 1 ----> 1 ecephys_session = cache.get_ecephys_session(ecephys_session_id=1052533639) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/behavior_neuropixels_project_cache.py:149, in VisualBehaviorNeuropixelsProjectCache.get_ecephys_session(self, ecephys_session_id) 129 def get_ecephys_session( 130 self, 131 ecephys_session_id: int 132 ) -> BehaviorEcephysSession: 133 """ 134 Loads all data for `ecephys_session_id` into an 135 `allensdk.ecephys.behavior_ecephys_session.BehaviorEcephysSession` (...) 147 148 """ --> 149 return self.fetch_api.get_ecephys_session(ecephys_session_id) File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/project_apis/data_io/behavior_neuropixels_project_cloud_api.py:114, in VisualBehaviorNeuropixelsProjectCloudApi.get_ecephys_session(self, ecephys_session_id) 111 return f 113 if not probes_meta.empty: --> 114 probe_data_path_map = { 115 p.name: make_lazy_load_filepath_function( 116 file_id=str(int(getattr(p, self.cache.file_id_column))) 117 ) for p in probes_meta.itertuples(index=False)} 118 else: 119 probe_data_path_map = None File ~/work/AllenSDK/AllenSDK/allensdk/brain_observatory/behavior/behavior_project_cache/project_apis/data_io/behavior_neuropixels_project_cloud_api.py:116, in <dictcomp>(.0) 111 return f 113 if not probes_meta.empty: 114 probe_data_path_map = { 115 p.name: make_lazy_load_filepath_function( --> 116 file_id=str(int(getattr(p, self.cache.file_id_column))) 117 ) for p in probes_meta.itertuples(index=False)} 118 else: 119 probe_data_path_map = None AttributeError: 'Pandas' object has no attribute 'file_id' ERROR:root:18 notebooks failed. Errors in: ['visual_behavior_ophys_data_access.ipynb', 'brain_observatory.ipynb', 'visual_behavior_neuropixels_quality_metrics.ipynb', 'brain_observatory_stimuli.ipynb', 'ecephys_optotagging.ipynb', 'ecephys_quickstart.ipynb', 'visual_behavior_neuropixels_quickstart.ipynb', 'visual_behavior_ophys_dataset_manifest.ipynb', 'visual_behavior_compare_across_trial_types.ipynb', 'visual_behavior_load_ophys_data.ipynb', 'visual_behavior_mouse_history.ipynb', 'reference_space.ipynb', 'aligning_behavioral_data_to_task_events_with_the_stimulus_and_trials_tables.ipynb', 'cell_types.ipynb', 'ecephys_session.ipynb', 'ecephys_receptive_fields.ipynb', 'ecephys_lfp_analysis.ipynb', 'visual_behavior_neuropixels_data_access.ipynb']
The text was updated successfully, but these errors were encountered:
Some of these fixed by #2609
Sorry, something went wrong.
Fixed issues in #2616, except for
TypeError: Invalid value 'null' for dtype boolean
which will be fixed by #2609, and issues related to old data on S3, which will be fixed by #2597
aamster
No branches or pull requests
In working on #2601, found that several of the notebooks are not running. Some of these issues have already been reported.
The following notebooks failed with these errors:
The text was updated successfully, but these errors were encountered: