[Neuroimaging] Nibabel error
Christopher Markiewicz
markiewicz at stanford.edu
Wed Apr 1 08:28:17 EDT 2020
Support for os.PathLike objects was added in nibabel 3.0. Please let us know if you find a case that fails in that version or later.
________________________________
From: Neuroimaging <neuroimaging-bounces+markiewicz=stanford.edu at python.org> on behalf of Anders Eklund <anders.eklund at liu.se>
Sent: Tuesday, March 31, 2020 4:52 PM
To: neuroimaging at python.org <neuroimaging at python.org>
Subject: [Neuroimaging] Nibabel error
Hello,
I get this error when I'm trying to use nibabel (2.5.1 I think), has anyone seen it before?
In prepare_3d_tf_record_dataset
img = nib.load(f)
File "/home/andek67/.local/lib/python3.7/site-packages/nibabel/loadsave.py", line 47, in load
is_valid, sniff = image_klass.path_maybe_image(filename, sniff)
File "/home/andek67/.local/lib/python3.7/site-packages/nibabel/filebasedimages.py", line 500, in path_maybe_image
klass._compressed_suffixes)
File "/home/andek67/.local/lib/python3.7/site-packages/nibabel/filename_parser.py", line 265, in splitext_addext
if endswith(filename, ext):
File "/home/andek67/.local/lib/python3.7/site-packages/nibabel/filename_parser.py", line 223, in _iendswith
return whole.lower().endswith(end.lower())
AttributeError: 'PosixPath' object has no attribute 'lower'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20200401/21feb9d2/attachment.html>
More information about the Neuroimaging
mailing list