Skip to content

Commit 4a7ef3a

Browse files
FIX: removed encode on a bytes object
to_xml already returns a bytes object in python3, which can not be encoded.
1 parent 5354bd0 commit 4a7ef3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/cifti2/cifti2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ def to_file_map(self, file_map=None):
770770
"""
771771
from .parse_cifti2_fast import Cifti2Extension
772772
header = self.extra
773-
extension = Cifti2Extension(content=self.header.to_xml().encode())
773+
extension = Cifti2Extension(content=self.header.to_xml())
774774
header.extensions.append(extension)
775775
data = np.reshape(self.data, [1, 1, 1, 1] + list(self.data.shape))
776776
img = Nifti2Image(data, None, header)

0 commit comments

Comments
 (0)