Xnatpy setting values for custom_fields

9 views
Skip to first unread message

Elena Baumeister

unread,
Dec 17, 2025, 10:40:49 AM12/17/25
to xnat_discussion
Hi,

we wanna upload data via pyxnat which is also working quiet well. Therefore we would also like to use the custom_fields property but unfortunately it is not working this way. We don't get any error but the statement is returning None and nothing is saving. But it is also not possible to use the get() function afterwards.
We already tried different things without any success. 

Does anybody know how to use it correctly or what the problem could be?
project = connection.create_object(...)
subject = connection.classes.SubjectData(...)
session = connection.classes.MrSessionData(...)
scan = connection.classes.MrScanData(...)
scan.custom_fields.set('test', 23, type_='xs:integer')
Reply all
Reply to author
Forward
0 new messages