-
Notifications
You must be signed in to change notification settings - Fork 145
Closed
Description
The newer version of nibabel (4.0) introduced some deprecation errors. We need to test our code against this newer version and fix the code that fails.
----> 1 cortex.freesurfer.import_subj("subj01")
File ~/.local/lib/python3.8/site-packages/cortex/freesurfer.py:206, in import_subj(fs_subject, cx_subject, freesurfer_subject_dir, whitematter_surf)
204 pts, polys, _ = get_surf(fs_subject, hemi, fsname, freesurfer_subject_dir=freesurfer_subject_dir)
205 fname = str(surfs.format(subj=cx_subject, name=name, hemi=hemi))
--> 206 formats.write_gii(fname, pts=pts + surfmove, polys=polys)
208 for curv, info in dict(sulc="sulcaldepth", thickness="thickness", curv="curvature").items():
209 lh, rh = [parse_curv(curvs.format(hemi=hemi, name=curv)) for hemi in ['lh', 'rh']]
File ~/.local/lib/python3.8/site-packages/cortex/formats.pyx:193, in cortex.formats.write_gii()
File ~/.local/lib/python3.8/site-packages/nibabel/deprecator.py:181, in Deprecator.__call__.<locals>.deprecator.<locals>.deprecated_func(*args, **kwargs)
178 @functools.wraps(func)
179 def deprecated_func(*args, **kwargs):
180 if until and self.is_bad_version(until):
--> 181 raise error_class(message)
182 warnings.warn(message, warn_class, stacklevel=2)
183 return func(*args, **kwargs)
ExpiredDeprecationError: from_array method is deprecated. Please use GiftiDataArray constructor instead.
* deprecated from version: 2.1
* Raises <class 'nibabel.deprecator.ExpiredDeprecationError'> as of version: 4.0
Originally posted by @mingxue1204 in #469 (comment)
Metadata
Metadata
Assignees
Labels
No labels