You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Spacingd crashes when the data dict has a non-dict key starting with '<key>_' (regression in 1.6.0) #9165
Any other value that happens to share the prefix (for example a string image_path, or an int image_index) makes the transform raise AttributeError: 'str' object has no attribute 'update' for NIfTI inputs.
This breaks MONAI Label in practice. Its inference pipeline always sets data["image_path"], and its radiology app uses Spacingd("image", ...), so NIfTI inference fails on MONAI 1.6.x.
Hi @garciadias , thanks for the detailed report. I saw you offered to open a PR; are you still planning to? If not, I’d be happy to take it. One extra thing I noticed: k.startswith(...) would also fail if the dict has a non-string key, so the fix could check isinstance(k, str) as well as isinstance(d[k], dict).
Activity
test: xfail graphcut inferer tests on MONAI >= 1.6 (Spacingd regression)
caitlin-leonard commentedon Oct 13, 2026
Hi @garciadias , thanks for the detailed report. I saw you offered to open a PR; are you still planning to? If not, I’d be happy to take it. One extra thing I noticed: k.startswith(...) would also fail if the dict has a non-string key, so the fix could check isinstance(k, str) as well as isinstance(d[k], dict).
Fix Spacingd updating non-metadata entries that share the key prefix (#…