Skip to content

Commit 5d8dba3

Browse files
FIX nibabel 5.1 compatibility
1 parent ee4b89e commit 5d8dba3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

surfer/io.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
import gzip
88
import numpy as np
99
import nibabel as nib
10-
from nibabel.spatialimages import ImageFileError
10+
try:
11+
from nibabel.spatialimages import ImageFileError # removed in nibabel 5.1
12+
except ImportError:
13+
from nibabel.filebasedimages import ImageFileError
1114

1215
from .utils import verbose
1316

0 commit comments

Comments
 (0)