We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8c3cf9 commit 8102aa7Copy full SHA for 8102aa7
nibabel/nifti1.py
@@ -1740,8 +1740,7 @@ def _chk_magic(hdr, fix=False):
1740
magic = hdr['magic'].item()
1741
if magic in (hdr.pair_magic, hdr.single_magic):
1742
return hdr, rep
1743
- magic = magic.decode('latin-1')
1744
- rep.problem_msg = f'magic string "{magic}" is not valid'
+ rep.problem_msg = f'magic string {magic.decode("latin1")!r} is not valid'
1745
rep.problem_level = 45
1746
if fix:
1747
rep.fix_msg = 'leaving as is, but future errors are likely'
0 commit comments