In [1]:
%run setup_data_paths.py
Loading all paths and variables into memory
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
/home/rphlypo/Projects/parietalretreat/setup_data_paths.py in <module>()
178 dump_dir="/volatile/storage/workspace/" +
179 "parietal_retreat/covariance_learn/",
--> 180 n_jobs=20)
/home/rphlypo/Projects/parietalretreat/setup_data_paths.py in run(root_dir, dump_dir, data_set, n_jobs)
151 print "Loading all paths and variables into memory"
152 df = get_all_paths(root_dir=root_dir, data_set=data_set)
--> 153 target_affine_ = nibabel.load(df["func"][0]).get_affine()
154 target_shape_ = nibabel.load(df["func"][0]).shape[:-1]
155 print "preparing and running MultiNiftiMasker"
/home/rphlypo/.local/lib/python2.7/site-packages/pandas/core/frame.pyc in __getitem__(self, key)
1633 return self._getitem_multilevel(key)
1634 else:
-> 1635 return self._getitem_column(key)
1636
1637 def _getitem_column(self, key):
/home/rphlypo/.local/lib/python2.7/site-packages/pandas/core/frame.pyc in _getitem_column(self, key)
1640 # get column
1641 if self.columns.is_unique:
-> 1642 return self._get_item_cache(key)
1643
1644 # duplicate columns & possible reduce dimensionaility
/home/rphlypo/.local/lib/python2.7/site-packages/pandas/core/generic.pyc in _get_item_cache(self, item)
981 res = cache.get(item)
982 if res is None:
--> 983 values = self._data.get(item)
984 res = self._box_item_values(item, values)
985 cache[item] = res
/home/rphlypo/.local/lib/python2.7/site-packages/pandas/core/internals.pyc in get(self, item)
2752 return self.get_for_nan_indexer(indexer)
2753
-> 2754 _, block = self._find_block(item)
2755 return block.get(item)
2756 else:
/home/rphlypo/.local/lib/python2.7/site-packages/pandas/core/internals.pyc in _find_block(self, item)
3063
3064 def _find_block(self, item):
-> 3065 self._check_have(item)
3066 for i, block in enumerate(self.blocks):
3067 if item in block:
/home/rphlypo/.local/lib/python2.7/site-packages/pandas/core/internals.pyc in _check_have(self, item)
3070 def _check_have(self, item):
3071 if item not in self.items:
-> 3072 raise KeyError('no item named %s' % com.pprint_thing(item))
3073
3074 def reindex_axis(self, new_axis, indexer=None, method=None, axis=0,
KeyError: u'no item named func'
Content source: rphlypo/parietalretreat
Similar notebooks: