[Neuroimaging] nibabel save returning NotImplementedError at _to_xml_element

Suzanne Witt switt4 at uwo.ca
Thu Mar 28 16:08:28 EDT 2019


I apologize if this has already been addressed in a previous message, but I did not find anything searching the archives from the Nibabel website.

I am running python 3.7.0 on a conda installation and recently installed the nibabel package to make use of its gifti class.

I have a python script that builds a gifti image object and fills in all of the meta data, label table, and data array details.  The script is based off of a matlab one that successfully makes use of Guillaume Flandin’s @gifti toolkit.  (Not sure if this is relevant or not, but the gifti image objects contains 30 separate data arrays, one for each of 30 individual subjects.)  I have compared my gifti image object’s structure and details to a similar one I loaded in to python using nibabel, and everything looks similar between the two.

When I go to save my newly created gifti image object out using nibabel.save, I am getting a “NotImplementedError” in relation to _to_xml_element().  I am quite new to python, so I have no idea what the error means (a google search and digging through Stack Overflow didn’t yield much I could make sense of).  Trying to debug opened up xmlutils.py, where the only thing that seemed to be defined for _to_xml_element() was raising this NotImplementedError()...

Any suggestions as to how best to proceed?

I’m really not sure if this error is being thrown by something on my end or something on nibabel’s end, so I am happy to provide more details on my python script if that would help.

Thanks in advance,


[cid:67412C66-BB70-409C-BE50-7BADCECDE5F9 at uwo-x-11.wireless.uwo.pri]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20190328/d57927d2/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-2.png
Type: image/png
Size: 98669 bytes
Desc: PastedGraphic-2.png
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20190328/d57927d2/attachment-0001.png>

More information about the Neuroimaging mailing list