diff --git a/nibabel/streamlines/trk.py b/nibabel/streamlines/trk.py index 9eeef0f1cd..8c7873d109 100644 --- a/nibabel/streamlines/trk.py +++ b/nibabel/streamlines/trk.py @@ -728,6 +728,10 @@ def __str__(self): vars['property_names'] = "\n ".join([asstr(s) for s in vars['property_name'] if len(s) > 0]) + # Make all byte strings into strings + # Fixes recursion error on Python 3.3 + vars = dict((k, asstr(v) if hasattr(v, 'decode') else v) + for k, v in vars.items()) return """\ MAGIC NUMBER: {MAGIC_NUMBER} v.{version}