In [43]: dataset = fmri_dataset( ....: samples = os.path.join(pymvpa_dataroot, 'bold.nii.gz'), ....: targets = attr.targets, ....: chunks = attr.chunks, ....: mask = os.path.join(pymvpa_dataroot, 'mask_brain.nii.gz')) ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multi-line statement', (2, 0)) --------------------------------------------------------------------------- MemoryError Traceback (most recent call last) C:\Documents and Settings\Flew\ in () C:\Python26\lib\site-packages\mvpa\datasets\mri.pyc in fmri_dataset(samples, tar gets, chunks, mask, sprefix, tprefix, add_fa) 200 """ 201 # load the samples --> 202 imgdata, imghdr, imgtype = _load_anyimg(samples, ensure=True, enforc e_dim=4) 203 204 # figure out what the mask is, but only handle known cases, the rest C:\Python26\lib\site-packages\mvpa\datasets\mri.pyc in _load_anyimg(src, ensure, enforce_dim) 335 # try opening the beast; this might yield none in case of an uns upported 336 # argument and is handled accordingly below --> 337 data = _img2data(src) 338 if not data is None: 339 imgdata, imghdr, imgtype = data C:\Python26\lib\site-packages\mvpa\datasets\mri.pyc in _img2data(src) 64 if isinstance(img, nibabel.spatialimages.SpatialImage): 65 # nibabel image, dissect and return pieces ---> 66 return _get_txyz_shaped(img.get_data()), img.get_header(), img._ _class__ 67 else: 68 # no clue what it is C:\Python26\lib\site-packages\nibabel\spatialimages.pyc in get_data(self) 334 if self._data is None: 335 raise ImageDataError('No data in this image') --> 336 return np.asanyarray(self._data) 337 338 @property C:\Python26\lib\site-packages\numpy\core\numeric.pyc in asanyarray(a, dtype, ord er) 285 286 """ --> 287 return array(a, dtype, copy=False, order=order, subok=True) 288 289 def ascontiguousarray(a, dtype=None): C:\Python26\lib\site-packages\nibabel\arrayproxy.pyc in __array__(self) 19 ''' Cached read of data from file ''' 20 if self._data is None: ---> 21 self._data = self._read_data() 22 return self._data 23 C:\Python26\lib\site-packages\nibabel\analyze.pyc in _read_data(self) 1279 def _read_data(self): 1280 fileobj = allopen(self.file_like) -> 1281 data = self.header.data_from_fileobj(fileobj) 1282 if isinstance(self.file_like, basestring): # filename 1283 fileobj.close() C:\Python26\lib\site-packages\nibabel\analyze.pyc in data_from_fileobj(self, fil eobj) 581 ''' 582 # read unscaled data --> 583 data = self.raw_data_from_fileobj(fileobj) 584 # get scalings from header. Value of None means not present in header 585 slope, inter = self.get_slope_inter() C:\Python26\lib\site-packages\nibabel\analyze.pyc in raw_data_from_fileobj(self, fileobj) 553 shape = self.get_data_shape() 554 offset = self.get_data_offset() --> 555 return array_from_file(shape, dtype, fileobj, offset) 556 557 def data_from_fileobj(self, fileobj): C:\Python26\lib\site-packages\nibabel\volumeutils.pyc in array_from_file(shape, in_dtype, infile, offset, order) 480 if datasize == 0: 481 return np.array([]) --> 482 data_str = infile.read(datasize) 483 if len(data_str) != datasize: 484 if hasattr(infile, 'name'): C:\Python26\lib\gzip.pyc in read(self, size) 217 try: 218 while size > self.extrasize: --> 219 self._read(readsize) 220 readsize = min(self.max_read_chunk, readsize * 2) 221 except EOFError: C:\Python26\lib\gzip.pyc in _read(self, size) 270 271 uncompress = self.decompress.decompress(buf) --> 272 self._add_read_data( uncompress ) 273 274 if self.decompress.unused_data != "": C:\Python26\lib\gzip.pyc in _add_read_data(self, data) 287 def _add_read_data(self, data): 288 self.crc = zlib.crc32(data, self.crc) & 0xffffffffL --> 289 self.extrabuf = self.extrabuf + data 290 self.extrasize = self.extrasize + len(data) 291 self.size = self.size + len(data) MemoryError: